summaryrefslogtreecommitdiffstats
path: root/chrome/test/mini_installer_test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/mini_installer_test')
-rw-r--r--chrome/test/mini_installer_test/chrome_mini_installer.cc19
-rw-r--r--chrome/test/mini_installer_test/test.cc2
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();