| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/test/test_reg_util_win.h" | 8 #include "base/test/test_reg_util_win.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 void ProductStateTest::TearDown() { | 90 void ProductStateTest::TearDown() { |
| 91 // Done with the keys. | 91 // Done with the keys. |
| 92 client_state_.Close(); | 92 client_state_.Close(); |
| 93 clients_.Close(); | 93 clients_.Close(); |
| 94 EXPECT_EQ(ERROR_SUCCESS, ::RegOverridePredefKey(overridden_, NULL)); | 94 EXPECT_EQ(ERROR_SUCCESS, ::RegOverridePredefKey(overridden_, NULL)); |
| 95 overridden_ = NULL; | 95 overridden_ = NULL; |
| 96 system_install_ = false; | 96 system_install_ = false; |
| 97 | 97 |
| 98 // Shotgun approach to clearing out data we may have written. | |
| 99 RegistryOverrideManager::DeleteAllTempKeys(); | |
| 100 | |
| 101 testing::Test::TearDown(); | 98 testing::Test::TearDown(); |
| 102 } | 99 } |
| 103 | 100 |
| 104 void ProductStateTest::MinimallyInstallProduct(const wchar_t* version) { | 101 void ProductStateTest::MinimallyInstallProduct(const wchar_t* version) { |
| 105 EXPECT_EQ(ERROR_SUCCESS, | 102 EXPECT_EQ(ERROR_SUCCESS, |
| 106 clients_.WriteValue(google_update::kRegVersionField, version)); | 103 clients_.WriteValue(google_update::kRegVersionField, version)); |
| 107 } | 104 } |
| 108 | 105 |
| 109 void ProductStateTest::ApplyUninstallCommand(const wchar_t* exe_path, | 106 void ProductStateTest::ApplyUninstallCommand(const wchar_t* exe_path, |
| 110 const wchar_t* args) { | 107 const wchar_t* args) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 416 |
| 420 // Uninstall command with --multi-install is multi install. | 417 // Uninstall command with --multi-install is multi install. |
| 421 { | 418 { |
| 422 ProductState state; | 419 ProductState state; |
| 423 ApplyUninstallCommand(L"setup.exe", | 420 ApplyUninstallCommand(L"setup.exe", |
| 424 L"--uninstall --chrome --multi-install"); | 421 L"--uninstall --chrome --multi-install"); |
| 425 EXPECT_TRUE(state.Initialize(system_install_, dist_)); | 422 EXPECT_TRUE(state.Initialize(system_install_, dist_)); |
| 426 EXPECT_TRUE(state.is_multi_install()); | 423 EXPECT_TRUE(state.is_multi_install()); |
| 427 } | 424 } |
| 428 } | 425 } |
| OLD | NEW |