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

Side by Side Diff: base/mac/mac_util_unittest.mm

Issue 11369186: Merge trunk r166585 to the 24.0.1312 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/mac/mac_util.mm ('k') | base/process_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); 151 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
152 152
153 if (major == 10) { 153 if (major == 10) {
154 if (minor == 6) { 154 if (minor == 6) {
155 EXPECT_TRUE(IsOSSnowLeopard()); 155 EXPECT_TRUE(IsOSSnowLeopard());
156 EXPECT_FALSE(IsOSLion()); 156 EXPECT_FALSE(IsOSLion());
157 EXPECT_TRUE(IsOSLionOrEarlier()); 157 EXPECT_TRUE(IsOSLionOrEarlier());
158 EXPECT_FALSE(IsOSLionOrLater()); 158 EXPECT_FALSE(IsOSLionOrLater());
159 EXPECT_FALSE(IsOSMountainLion()); 159 EXPECT_FALSE(IsOSMountainLion());
160 EXPECT_FALSE(IsOSMountainLionOrLater()); 160 EXPECT_FALSE(IsOSMountainLionOrLater());
161 EXPECT_FALSE( 161 EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
162 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
163 } else if (minor == 7) { 162 } else if (minor == 7) {
164 EXPECT_FALSE(IsOSSnowLeopard()); 163 EXPECT_FALSE(IsOSSnowLeopard());
165 EXPECT_TRUE(IsOSLion()); 164 EXPECT_TRUE(IsOSLion());
166 EXPECT_TRUE(IsOSLionOrEarlier()); 165 EXPECT_TRUE(IsOSLionOrEarlier());
167 EXPECT_TRUE(IsOSLionOrLater()); 166 EXPECT_TRUE(IsOSLionOrLater());
168 EXPECT_FALSE(IsOSMountainLion()); 167 EXPECT_FALSE(IsOSMountainLion());
169 EXPECT_FALSE(IsOSMountainLionOrLater()); 168 EXPECT_FALSE(IsOSMountainLionOrLater());
170 EXPECT_FALSE( 169 EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
171 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
172 } else if (minor == 8) { 170 } else if (minor == 8) {
173 EXPECT_FALSE(IsOSSnowLeopard()); 171 EXPECT_FALSE(IsOSSnowLeopard());
174 EXPECT_FALSE(IsOSLion()); 172 EXPECT_FALSE(IsOSLion());
175 EXPECT_FALSE(IsOSLionOrEarlier()); 173 EXPECT_FALSE(IsOSLionOrEarlier());
176 EXPECT_TRUE(IsOSLionOrLater()); 174 EXPECT_TRUE(IsOSLionOrLater());
177 EXPECT_TRUE(IsOSMountainLion()); 175 EXPECT_TRUE(IsOSMountainLion());
178 EXPECT_TRUE(IsOSMountainLionOrLater()); 176 EXPECT_TRUE(IsOSMountainLionOrLater());
179 EXPECT_FALSE( 177 EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
180 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
181 } else { 178 } else {
182 // Not five, six, seven, or eight. Ah, ah, ah. 179 // Not five, six, seven, or eight. Ah, ah, ah.
183 EXPECT_TRUE(false); 180 EXPECT_TRUE(false);
184 } 181 }
185 } else { 182 } else {
186 // Not ten. What you gonna do? 183 // Not ten. What you gonna do?
187 EXPECT_FALSE(true); 184 EXPECT_FALSE(true);
188 } 185 }
189 } 186 }
190 187
(...skipping 15 matching lines...) Expand all
206 EXPECT_TRUE(ParseModelIdentifier("MacBookPro6,2", &model, &major, &minor)); 203 EXPECT_TRUE(ParseModelIdentifier("MacBookPro6,2", &model, &major, &minor));
207 EXPECT_EQ(model, "MacBookPro"); 204 EXPECT_EQ(model, "MacBookPro");
208 EXPECT_EQ(6, major); 205 EXPECT_EQ(6, major);
209 EXPECT_EQ(2, minor); 206 EXPECT_EQ(2, minor);
210 } 207 }
211 208
212 } // namespace 209 } // namespace
213 210
214 } // namespace mac 211 } // namespace mac
215 } // namespace base 212 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/mac_util.mm ('k') | base/process_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698