diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-17 13:32:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-20 11:06:34 +0000 |
commit | db205d71b2ac4cf5cedc762b1431decaca3c0321 (patch) | |
tree | 1a3abbabb57ad6be216ce48bcda87ffed9314ed6 /chromium/base/mac/mac_util_unittest.mm | |
parent | 3d02dd98fb1928c0c92d3ca4d67c2baeca4aece1 (diff) | |
download | qtwebengine-chromium-60-based.tar.gz |
[Backport] mac: Update knowledge of CFAllocator internals for 10.1360-based
For each new major OS version, we need to poke at the internals
of CFAllocator to enable the out-of-memory killer for the default
CFAllocator implementations.
This update is for macOS 10.13 ("High Sierra"), whose CFAllocator
internals are unchanged from 10.12 (and in fact from 10.7). It also
updates the base::mac::IsOS*() family of functions for this new OS
version.
BUG=45650
TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis
Change-Id: I2cab74c57cb75e4aebc2cb13d6844f0c77dbd54f
Reviewed-on: https://chromium-review.googlesource.com/565467
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/base/mac/mac_util_unittest.mm')
-rw-r--r-- | chromium/base/mac/mac_util_unittest.mm | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/chromium/base/mac/mac_util_unittest.mm b/chromium/base/mac/mac_util_unittest.mm index ff508f3336b..266d1c42947 100644 --- a/chromium/base/mac/mac_util_unittest.mm +++ b/chromium/base/mac/mac_util_unittest.mm @@ -150,7 +150,10 @@ TEST_F(MacUtilTest, IsOSEllipsis) { EXPECT_FALSE(IsOS10_12()); EXPECT_FALSE(IsAtLeastOS10_12()); EXPECT_TRUE(IsAtMostOS10_12()); - EXPECT_FALSE(IsOSLaterThan10_12_DontCallThis()); + EXPECT_FALSE(IsOS10_13()); + EXPECT_FALSE(IsAtLeastOS10_13()); + EXPECT_TRUE(IsAtMostOS10_13()); + EXPECT_FALSE(IsOSLaterThan10_13_DontCallThis()); } else if (minor == 10) { EXPECT_FALSE(IsOS10_9()); EXPECT_FALSE(IsAtMostOS10_9()); @@ -164,7 +167,10 @@ TEST_F(MacUtilTest, IsOSEllipsis) { EXPECT_FALSE(IsOS10_12()); EXPECT_FALSE(IsAtLeastOS10_12()); EXPECT_TRUE(IsAtMostOS10_12()); - EXPECT_FALSE(IsOSLaterThan10_12_DontCallThis()); + EXPECT_FALSE(IsOS10_13()); + EXPECT_FALSE(IsAtLeastOS10_13()); + EXPECT_TRUE(IsAtMostOS10_13()); + EXPECT_FALSE(IsOSLaterThan10_13_DontCallThis()); } else if (minor == 11) { EXPECT_FALSE(IsOS10_9()); EXPECT_FALSE(IsAtMostOS10_9()); @@ -178,7 +184,10 @@ TEST_F(MacUtilTest, IsOSEllipsis) { EXPECT_FALSE(IsOS10_12()); EXPECT_FALSE(IsAtLeastOS10_12()); EXPECT_TRUE(IsAtMostOS10_12()); - EXPECT_FALSE(IsOSLaterThan10_12_DontCallThis()); + EXPECT_FALSE(IsOS10_13()); + EXPECT_FALSE(IsAtLeastOS10_13()); + EXPECT_TRUE(IsAtMostOS10_13()); + EXPECT_FALSE(IsOSLaterThan10_13_DontCallThis()); } else if (minor == 12) { EXPECT_FALSE(IsOS10_9()); EXPECT_FALSE(IsAtMostOS10_9()); @@ -192,9 +201,29 @@ TEST_F(MacUtilTest, IsOSEllipsis) { EXPECT_TRUE(IsOS10_12()); EXPECT_TRUE(IsAtMostOS10_12()); EXPECT_TRUE(IsAtLeastOS10_12()); - EXPECT_FALSE(IsOSLaterThan10_12_DontCallThis()); + EXPECT_FALSE(IsOS10_13()); + EXPECT_FALSE(IsAtLeastOS10_13()); + EXPECT_TRUE(IsAtMostOS10_13()); + EXPECT_FALSE(IsOSLaterThan10_13_DontCallThis()); + } else if (minor == 13) { + EXPECT_FALSE(IsOS10_9()); + EXPECT_FALSE(IsAtMostOS10_9()); + EXPECT_TRUE(IsAtLeastOS10_9()); + EXPECT_FALSE(IsOS10_10()); + EXPECT_FALSE(IsAtMostOS10_10()); + EXPECT_TRUE(IsAtLeastOS10_10()); + EXPECT_FALSE(IsOS10_11()); + EXPECT_FALSE(IsAtMostOS10_11()); + EXPECT_TRUE(IsAtLeastOS10_11()); + EXPECT_FALSE(IsOS10_12()); + EXPECT_FALSE(IsAtMostOS10_12()); + EXPECT_TRUE(IsAtLeastOS10_12()); + EXPECT_TRUE(IsOS10_13()); + EXPECT_TRUE(IsAtLeastOS10_13()); + EXPECT_TRUE(IsAtMostOS10_13()); + EXPECT_FALSE(IsOSLaterThan10_13_DontCallThis()); } else { - // Not nine, ten, eleven, or twelve. Ah, ah, ah. + // Not nine, ten, eleven, twelve, or thirteen. Ah, ah, ah. EXPECT_TRUE(false); } } else { |