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

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

Issue 10821062: Fix CleanupProcesses() interface to use TimeDelta. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/test/mini_installer_test/installer_test_util.cc ('k') | no next file » | 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 #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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/chrome_result_codes.h" 10 #include "chrome/common/chrome_result_codes.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ASSERT_TRUE(installer_test::ValidateInstall(true, 197 ASSERT_TRUE(installer_test::ValidateInstall(true,
198 InstallationValidator::CHROME_MULTI, provider_->GetCurrentBuild())); 198 InstallationValidator::CHROME_MULTI, provider_->GetCurrentBuild()));
199 } 199 }
200 200
201 // Repair version folder. 201 // Repair version folder.
202 TEST_F(MiniInstallTest, RepairFolderOnFullUser) { 202 TEST_F(MiniInstallTest, RepairFolderOnFullUser) {
203 ASSERT_TRUE(installer_test::Install( 203 ASSERT_TRUE(installer_test::Install(
204 full_installer_, SwitchBuilder().AddChrome())); 204 full_installer_, SwitchBuilder().AddChrome()));
205 ASSERT_TRUE(installer_test::ValidateInstall(false, 205 ASSERT_TRUE(installer_test::ValidateInstall(false,
206 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 206 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
207 base::CleanupProcesses(installer::kChromeExe, 0, 207 base::CleanupProcesses(installer::kChromeExe, base::TimeDelta(),
208 content::RESULT_CODE_HUNG, NULL); 208 content::RESULT_CODE_HUNG, NULL);
209 ASSERT_TRUE(installer_test::DeleteInstallDirectory( 209 ASSERT_TRUE(installer_test::DeleteInstallDirectory(
210 false, // system level 210 false, // system level
211 InstallationValidator::CHROME_SINGLE)); 211 InstallationValidator::CHROME_SINGLE));
212 ASSERT_TRUE(installer_test::Install( 212 ASSERT_TRUE(installer_test::Install(
213 full_installer_, SwitchBuilder().AddChrome())); 213 full_installer_, SwitchBuilder().AddChrome()));
214 ASSERT_TRUE(installer_test::ValidateInstall(false, 214 ASSERT_TRUE(installer_test::ValidateInstall(false,
215 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 215 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
216 } 216 }
217 217
218 TEST_F(MiniInstallTest, RepairFolderOnFullSys) { 218 TEST_F(MiniInstallTest, RepairFolderOnFullSys) {
219 ASSERT_TRUE(installer_test::Install(full_installer_, 219 ASSERT_TRUE(installer_test::Install(full_installer_,
220 SwitchBuilder().AddChrome().AddSystemInstall())); 220 SwitchBuilder().AddChrome().AddSystemInstall()));
221 ASSERT_TRUE(installer_test::ValidateInstall(true, 221 ASSERT_TRUE(installer_test::ValidateInstall(true,
222 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 222 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
223 base::CleanupProcesses(installer::kChromeExe, 0, 223 base::CleanupProcesses(installer::kChromeExe, base::TimeDelta(),
224 content::RESULT_CODE_HUNG, NULL); 224 content::RESULT_CODE_HUNG, NULL);
225 ASSERT_TRUE(installer_test::DeleteInstallDirectory( 225 ASSERT_TRUE(installer_test::DeleteInstallDirectory(
226 true, // system level 226 true, // system level
227 InstallationValidator::CHROME_SINGLE)); 227 InstallationValidator::CHROME_SINGLE));
228 ASSERT_TRUE(installer_test::Install(full_installer_, 228 ASSERT_TRUE(installer_test::Install(full_installer_,
229 SwitchBuilder().AddChrome().AddSystemInstall())); 229 SwitchBuilder().AddChrome().AddSystemInstall()));
230 ASSERT_TRUE(installer_test::ValidateInstall(true, 230 ASSERT_TRUE(installer_test::ValidateInstall(true,
231 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 231 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
232 } 232 }
233 233
234 // Repair registry. 234 // Repair registry.
235 TEST_F(MiniInstallTest, RepairRegistryOnFullUser) { 235 TEST_F(MiniInstallTest, RepairRegistryOnFullUser) {
236 ASSERT_TRUE(installer_test::Install( 236 ASSERT_TRUE(installer_test::Install(
237 full_installer_, SwitchBuilder().AddChrome())); 237 full_installer_, SwitchBuilder().AddChrome()));
238 ASSERT_TRUE(installer_test::ValidateInstall(false, 238 ASSERT_TRUE(installer_test::ValidateInstall(false,
239 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 239 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
240 base::CleanupProcesses(installer::kChromeExe, 0, 240 base::CleanupProcesses(installer::kChromeExe, base::TimeDelta(),
241 content::RESULT_CODE_HUNG, NULL); 241 content::RESULT_CODE_HUNG, NULL);
242 ASSERT_TRUE(installer_test::DeleteRegistryKey( 242 ASSERT_TRUE(installer_test::DeleteRegistryKey(
243 false, // system level 243 false, // system level
244 InstallationValidator::CHROME_SINGLE)); 244 InstallationValidator::CHROME_SINGLE));
245 ASSERT_TRUE( 245 ASSERT_TRUE(
246 installer_test::Install(full_installer_, SwitchBuilder().AddChrome())); 246 installer_test::Install(full_installer_, SwitchBuilder().AddChrome()));
247 ASSERT_TRUE(installer_test::ValidateInstall(false, 247 ASSERT_TRUE(installer_test::ValidateInstall(false,
248 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild())); 248 InstallationValidator::CHROME_SINGLE, provider_->GetCurrentBuild()));
249 } 249 }
250 250
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 426
427 #endif 427 #endif
428 428
429 TEST(GenericInstallTest, MiniInstallTestValidWindowsVersion) { 429 TEST(GenericInstallTest, MiniInstallTestValidWindowsVersion) {
430 // We run the tests on all supported OSes. 430 // We run the tests on all supported OSes.
431 // Make sure the code agrees. 431 // Make sure the code agrees.
432 EXPECT_TRUE(InstallUtil::IsOSSupported()); 432 EXPECT_TRUE(InstallUtil::IsOSSupported());
433 } 433 }
434 434
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/installer_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698