| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 "chrome/test/mini_installer_test/chrome_mini_installer.h" | 5 #include "chrome/test/mini_installer_test/chrome_mini_installer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/platform_thread.h" | 10 #include "base/platform_thread.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 ASSERT_TRUE(file_util::PathExists(uninstall_path)); | 210 ASSERT_TRUE(file_util::PathExists(uninstall_path)); |
| 211 std::wstring uninstall_args = L"\"" + uninstall_path + | 211 std::wstring uninstall_args = L"\"" + uninstall_path + |
| 212 L"\"" + L" -uninstall"; | 212 L"\"" + L" -uninstall"; |
| 213 if (install_type_ == mini_installer_constants::kSystemInstall) | 213 if (install_type_ == mini_installer_constants::kSystemInstall) |
| 214 uninstall_args = uninstall_args + L" -system-level"; | 214 uninstall_args = uninstall_args + L" -system-level"; |
| 215 base::LaunchApp(uninstall_args, false, false, NULL); | 215 base::LaunchApp(uninstall_args, false, false, NULL); |
| 216 printf("Launched setup.exe -uninstall....\n"); | 216 printf("Launched setup.exe -uninstall....\n"); |
| 217 ASSERT_TRUE(CloseUninstallWindow()); | 217 ASSERT_TRUE(CloseUninstallWindow()); |
| 218 WaitUntilProcessStopsRunning( | |
| 219 mini_installer_constants::kChromeSetupExecutable); | |
| 220 printf("\n\nUninstall Checks:\n\n"); | 218 printf("\n\nUninstall Checks:\n\n"); |
| 219 PlatformThread::Sleep(400); |
| 221 ASSERT_FALSE(CheckRegistryKey(dist->GetVersionKey())); | 220 ASSERT_FALSE(CheckRegistryKey(dist->GetVersionKey())); |
| 222 DeleteAppFolder(); | 221 DeleteAppFolder(); |
| 223 FindChromeShortcut(); | 222 FindChromeShortcut(); |
| 224 CloseProcesses(mini_installer_constants::kIEExecutable); | 223 CloseProcesses(mini_installer_constants::kIEExecutable); |
| 225 ASSERT_EQ(0, | 224 ASSERT_EQ(0, |
| 226 base::GetProcessCount(mini_installer_constants::kIEExecutable, NULL)); | 225 base::GetProcessCount(mini_installer_constants::kIEExecutable, NULL)); |
| 227 } | 226 } |
| 228 | 227 |
| 229 bool ChromeMiniInstaller::CloseWindow(const wchar_t* window_name, | 228 bool ChromeMiniInstaller::CloseWindow(const wchar_t* window_name, |
| 230 UINT message) { | 229 UINT message) { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 const wchar_t* process_name) { | 663 const wchar_t* process_name) { |
| 665 int timer = 0; | 664 int timer = 0; |
| 666 printf("\nWaiting for this process to end... %ls\n", process_name); | 665 printf("\nWaiting for this process to end... %ls\n", process_name); |
| 667 while ((base::GetProcessCount(process_name, NULL) > 0) && | 666 while ((base::GetProcessCount(process_name, NULL) > 0) && |
| 668 (timer < 60000)) { | 667 (timer < 60000)) { |
| 669 PlatformThread::Sleep(200); | 668 PlatformThread::Sleep(200); |
| 670 timer = timer + 200; | 669 timer = timer + 200; |
| 671 } | 670 } |
| 672 ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); | 671 ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); |
| 673 } | 672 } |
| OLD | NEW |