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

Side by Side Diff: chrome/test/mini_installer_test/test.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/platform_thread.h" 7 #include "base/platform_thread.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/win_util.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "chrome/installer/util/install_util.h" 11 #include "chrome/installer/util/install_util.h"
12 #include "chrome/installer/util/util_constants.h" 12 #include "chrome/installer/util/util_constants.h"
13 #include "chrome/test/mini_installer_test/chrome_mini_installer.h" 13 #include "chrome/test/mini_installer_test/chrome_mini_installer.h"
14 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" 14 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h"
15 #include "chrome/test/mini_installer_test/mini_installer_test_util.h" 15 #include "chrome/test/mini_installer_test/mini_installer_test_util.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 18
19 // Although the C++ style guide disallows use of namespace directive, use 19 // Although the C++ style guide disallows use of namespace directive, use
(...skipping 24 matching lines...) Expand all
44 44
45 virtual void SetUp() { 45 virtual void SetUp() {
46 // Parse test command-line arguments. 46 // Parse test command-line arguments.
47 const CommandLine* cmd = CommandLine::ForCurrentProcess(); 47 const CommandLine* cmd = CommandLine::ForCurrentProcess();
48 std::wstring build = 48 std::wstring build =
49 cmd->GetSwitchValueNative(switches::kInstallerTestBuild); 49 cmd->GetSwitchValueNative(switches::kInstallerTestBuild);
50 if (build.empty()) 50 if (build.empty())
51 build = L"latest"; 51 build = L"latest";
52 force_tests_ = cmd->HasSwitch(switches::kInstallerTestForce); 52 force_tests_ = cmd->HasSwitch(switches::kInstallerTestForce);
53 chrome_frame_ = cmd->HasSwitch(installer_util::switches::kChromeFrame); 53 chrome_frame_ = cmd->HasSwitch(installer_util::switches::kChromeFrame);
54 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA || 54 if (base::win::GetVersion() < base::win::VERSION_VISTA ||
55 force_tests_) { 55 force_tests_) {
56 CleanTheSystem(); 56 CleanTheSystem();
57 // Separate the test output from cleaning output 57 // Separate the test output from cleaning output
58 printf("\nBEGIN test----------------------------------------\n"); 58 printf("\nBEGIN test----------------------------------------\n");
59 59
60 // Create a few differently configured installers that are used in 60 // Create a few differently configured installers that are used in
61 // the tests, for convenience. 61 // the tests, for convenience.
62 user_inst_.reset(new ChromeMiniInstaller(kUserInstall, 62 user_inst_.reset(new ChromeMiniInstaller(kUserInstall,
63 chrome_frame_)); 63 chrome_frame_));
64 sys_inst_.reset(new ChromeMiniInstaller(kSystemInstall, 64 sys_inst_.reset(new ChromeMiniInstaller(kSystemInstall,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 #endif 183 #endif
184 TEST_F(MiniInstallTest, MAYBE_InstallMiniInstallerUser) { 184 TEST_F(MiniInstallTest, MAYBE_InstallMiniInstallerUser) {
185 user_inst_->Install(); 185 user_inst_->Install();
186 } 186 }
187 187
188 TEST_F(MiniInstallTest, MiniInstallTestValidWindowsVersion) { 188 TEST_F(MiniInstallTest, MiniInstallTestValidWindowsVersion) {
189 // We run the tests on all supported OSes. 189 // We run the tests on all supported OSes.
190 // Make sure the code agrees. 190 // Make sure the code agrees.
191 EXPECT_TRUE(InstallUtil::IsOSSupported()); 191 EXPECT_TRUE(InstallUtil::IsOSSupported());
192 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698