diff options
author | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 18:08:34 +0000 |
---|---|---|
committer | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 18:08:34 +0000 |
commit | 2bbaf85a0682c864eb3de06ac417b32d360c3256 (patch) | |
tree | 9939210b6b38da128bcd415802a20227677c7711 /chrome/test | |
parent | 19e8d5968d09edb40287410dd4f5e9fa47712216 (diff) | |
download | chromium_src-2bbaf85a0682c864eb3de06ac417b32d360c3256.zip chromium_src-2bbaf85a0682c864eb3de06ac417b32d360c3256.tar.gz chromium_src-2bbaf85a0682c864eb3de06ac417b32d360c3256.tar.bz2 |
Added a check to look for setup.exe before looking at registry. This test is failing becase of race conditon. This fix should resolve the problem.
Review URL: http://codereview.chromium.org/99134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/mini_installer_test/chrome_mini_installer.cc | 19 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/test.cc | 2 |
2 files changed, 13 insertions, 8 deletions
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc index 3149a6e..7f1f71e 100644 --- a/chrome/test/mini_installer_test/chrome_mini_installer.cc +++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc @@ -215,8 +215,9 @@ void ChromeMiniInstaller::UnInstall() { base::LaunchApp(uninstall_args, false, false, NULL); printf("Launched setup.exe -uninstall....\n"); ASSERT_TRUE(CloseUninstallWindow()); + WaitUntilProcessStopsRunning( + mini_installer_constants::kChromeSetupExecutable); printf("\n\nUninstall Checks:\n\n"); - PlatformThread::Sleep(400); ASSERT_FALSE(CheckRegistryKey(dist->GetVersionKey())); DeleteAppFolder(); FindChromeShortcut(); @@ -662,11 +663,15 @@ void ChromeMiniInstaller::WaitUntilProcessStartsRunning( void ChromeMiniInstaller::WaitUntilProcessStopsRunning( const wchar_t* process_name) { int timer = 0; - printf("\nWaiting for this process to end... %ls\n", process_name); - while ((base::GetProcessCount(process_name, NULL) > 0) && - (timer < 60000)) { - PlatformThread::Sleep(200); - timer = timer + 200; + if (base::GetProcessCount(process_name, NULL) > 0) { + printf("\nWaiting for this process to end... %ls\n", process_name); + while ((base::GetProcessCount(process_name, NULL) > 0) && + (timer < 60000)) { + PlatformThread::Sleep(200); + timer = timer + 200; + } + } + else { + ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); } - ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); } diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc index 1ddb44b..a2e6419 100644 --- a/chrome/test/mini_installer_test/test.cc +++ b/chrome/test/mini_installer_test/test.cc @@ -60,7 +60,7 @@ TEST_F(MiniInstallTest, DISABLED_MiniInstallerSystemInstallTest) { } } -TEST_F(MiniInstallTest, DISABLED_MiniInstallerUserInstallTest) { +TEST_F(MiniInstallTest, MiniInstallerUserInstallTest) { if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); installer.Install(); |