Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2839)

Unified Diff: base/mac/mac_util_unittest.mm

Issue 9706001: [Mac] Add the OS version check functions for 10.8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/mac/mac_util_unittest.mm
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index 966d8edfe2606d1f7011f2748b938c829a5fb7cf..fd9cdef5267cf26fe8c832e7e30db85215f15e95 100644
--- a/base/mac/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -158,8 +158,13 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSSnowLeopardOrEarlier());
EXPECT_FALSE(IsOSSnowLeopardOrLater());
EXPECT_FALSE(IsOSLion());
+ EXPECT_TRUE(IsOSLionOrEarlier());
EXPECT_FALSE(IsOSLionOrLater());
- EXPECT_FALSE(IsOSLaterThanLion());
+ EXPECT_FALSE(IsOSMountainLion());
+ EXPECT_TRUE(IsOSMountainLionOrEarlier());
+ EXPECT_FALSE(IsOSMountainLionOrLater());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else if (minor == 6) {
EXPECT_FALSE(IsOSLeopard());
EXPECT_FALSE(IsOSLeopardOrEarlier());
@@ -167,8 +172,13 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSSnowLeopardOrEarlier());
EXPECT_TRUE(IsOSSnowLeopardOrLater());
EXPECT_FALSE(IsOSLion());
+ EXPECT_TRUE(IsOSLionOrEarlier());
EXPECT_FALSE(IsOSLionOrLater());
- EXPECT_FALSE(IsOSLaterThanLion());
+ EXPECT_FALSE(IsOSMountainLion());
+ EXPECT_TRUE(IsOSMountainLionOrEarlier());
+ EXPECT_FALSE(IsOSMountainLionOrLater());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else if (minor == 7) {
EXPECT_FALSE(IsOSLeopard());
EXPECT_FALSE(IsOSLeopardOrEarlier());
@@ -176,10 +186,29 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_FALSE(IsOSSnowLeopardOrEarlier());
EXPECT_TRUE(IsOSSnowLeopardOrLater());
EXPECT_TRUE(IsOSLion());
+ EXPECT_TRUE(IsOSLionOrEarlier());
EXPECT_TRUE(IsOSLionOrLater());
- EXPECT_FALSE(IsOSLaterThanLion());
+ EXPECT_FALSE(IsOSMountainLion());
+ EXPECT_TRUE(IsOSMountainLionOrEarlier());
+ EXPECT_FALSE(IsOSMountainLionOrLater());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
+ } else if (minor == 8) {
+ EXPECT_FALSE(IsOSLeopard());
+ EXPECT_FALSE(IsOSLeopardOrEarlier());
+ EXPECT_FALSE(IsOSSnowLeopard());
+ EXPECT_FALSE(IsOSSnowLeopardOrEarlier());
+ EXPECT_TRUE(IsOSSnowLeopardOrLater());
+ EXPECT_FALSE(IsOSLion());
+ EXPECT_FALSE(IsOSLionOrEarlier());
+ EXPECT_TRUE(IsOSLionOrLater());
+ EXPECT_TRUE(IsOSMountainLion());
+ EXPECT_TRUE(IsOSMountainLionOrEarlier());
+ EXPECT_TRUE(IsOSMountainLionOrLater());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else {
- // Not five, six, or seven. Ah, ah, ah.
+ // Not five, six, seven, or eight. Ah, ah, ah.
EXPECT_TRUE(false);
}
} else {

Powered by Google App Engine
This is Rietveld 408576698