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

Side by Side Diff: base/sys_info_unittest.cc

Issue 27088: Additional fix for Sandboxed WebKit on OS X. (Closed)
Patch Set: Fixes Created 11 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/sys_info.h" 6 #include "base/sys_info.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
9 9
10 typedef PlatformTest SysInfoTest; 10 typedef PlatformTest SysInfoTest;
(...skipping 18 matching lines...) Expand all
29 29
30 TEST_F(SysInfoTest, GetEnvVar) { 30 TEST_F(SysInfoTest, GetEnvVar) {
31 // Every setup should have non-empty PATH... 31 // Every setup should have non-empty PATH...
32 EXPECT_NE(base::SysInfo::GetEnvVar(L"PATH"), L""); 32 EXPECT_NE(base::SysInfo::GetEnvVar(L"PATH"), L"");
33 } 33 }
34 34
35 TEST_F(SysInfoTest, HasEnvVar) { 35 TEST_F(SysInfoTest, HasEnvVar) {
36 // Every setup should have PATH... 36 // Every setup should have PATH...
37 EXPECT_TRUE(base::SysInfo::HasEnvVar(L"PATH")); 37 EXPECT_TRUE(base::SysInfo::HasEnvVar(L"PATH"));
38 } 38 }
39
40 // TODO(port): If and when there's a LINUX version of this method, enable this
41 // unit test.
42 #if defined(OS_WIN) || defined(OS_MACOSX)
43 TEST_F(SysInfoTest, OperatingSystemVersionNumbers) {
44 int32 os_major_version = -1;
45 int32 os_minor_version = -1;
46 int32 os_bugfix_version = -1;
47 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
48 &os_minor_version,
49 &os_bugfix_version);
50 EXPECT_GT(os_major_version, 0);
51 EXPECT_GT(os_minor_version, 0);
52 EXPECT_GT(os_bugfix_version, 0);
53 }
54 #endif // OS_WIN || OS_MACOSX
OLDNEW
« base/sys_info.h ('K') | « base/sys_info_posix.cc ('k') | base/sys_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698