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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 printf("\n\nUninstalling Chrome...\n"); | 202 printf("\n\nUninstalling Chrome...\n"); |
203 printf("Closing Chrome processes, if any...\n"); | 203 printf("Closing Chrome processes, if any...\n"); |
204 CloseProcesses(installer_util::kChromeExe); | 204 CloseProcesses(installer_util::kChromeExe); |
205 std::wstring uninstall_path = GetUninstallPath(); | 205 std::wstring uninstall_path = GetUninstallPath(); |
206 if (uninstall_path == L"") { | 206 if (uninstall_path == L"") { |
207 printf("exiting.. Not proceeding with uninstall\n"); | 207 printf("exiting.. Not proceeding with uninstall\n"); |
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 --force-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 --force-uninstall....\n"); |
217 ASSERT_TRUE(CloseUninstallWindow()); | 217 // ASSERT_TRUE(CloseUninstallWindow()); |
218 WaitUntilProcessStopsRunning( | 218 WaitUntilProcessStopsRunning( |
219 mini_installer_constants::kChromeSetupExecutable); | 219 mini_installer_constants::kChromeSetupExecutable); |
220 printf("\n\nUninstall Checks:\n\n"); | 220 printf("\n\nUninstall Checks:\n\n"); |
221 ASSERT_FALSE(CheckRegistryKeyOnUninstall(dist->GetVersionKey())); | 221 ASSERT_FALSE(CheckRegistryKeyOnUninstall(dist->GetVersionKey())); |
222 DeleteAppFolder(); | 222 DeleteAppFolder(); |
223 FindChromeShortcut(); | 223 FindChromeShortcut(); |
224 CloseProcesses(mini_installer_constants::kIEExecutable); | 224 CloseProcesses(mini_installer_constants::kIEExecutable); |
225 ASSERT_EQ(0, | 225 ASSERT_EQ(0, |
226 base::GetProcessCount(mini_installer_constants::kIEExecutable, NULL)); | 226 base::GetProcessCount(mini_installer_constants::kIEExecutable, NULL)); |
227 } | 227 } |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 while ((base::GetProcessCount(process_name, NULL) > 0) && | 681 while ((base::GetProcessCount(process_name, NULL) > 0) && |
682 (timer < 60000)) { | 682 (timer < 60000)) { |
683 PlatformThread::Sleep(200); | 683 PlatformThread::Sleep(200); |
684 timer = timer + 200; | 684 timer = timer + 200; |
685 } | 685 } |
686 } | 686 } |
687 else { | 687 else { |
688 ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); | 688 ASSERT_EQ(0, base::GetProcessCount(process_name, NULL)); |
689 } | 689 } |
690 } | 690 } |
OLD | NEW |