Chromium Code Reviews| Index: chrome/installer/util/product_state_unittest.cc |
| =================================================================== |
| --- chrome/installer/util/product_state_unittest.cc (revision 97629) |
| +++ chrome/installer/util/product_state_unittest.cc (working copy) |
| @@ -5,6 +5,7 @@ |
| #include <windows.h> |
| #include "base/utf_string_conversions.h" |
| +#include "base/test/test_reg_util_win.h" |
| #include "base/version.h" |
| #include "base/win/registry.h" |
| #include "chrome/installer/util/browser_distribution.h" |
| @@ -16,6 +17,7 @@ |
| using base::win::RegKey; |
| using installer::ProductState; |
| +using registry_util::ScopedRegistryKeyOverride; |
| class ProductStateTest : public testing::Test { |
| protected: |
| @@ -48,7 +50,7 @@ |
| BrowserDistribution::CHROME_BROWSER); |
| // And we'll play in HKCU here: |
| - temp_key_path_.assign(TempRegKeyOverride::kTempTestKeyPath) |
| + temp_key_path_.assign(ScopedRegistryKeyOverride::kTempTestKeyPath) |
| .append(1, L'\\') |
| .append(L"ProductStateTest"); |
| } |
| @@ -68,7 +70,7 @@ |
| system_install_ = true; |
| overridden_ = (system_install_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER); |
| - // Override for test purposes. We don't use TempRegKeyOverride |
| + // Override for test purposes. We don't use ScopedRegistryKeyOverride |
| // directly because it doesn't suit itself to our use here. |
| RegKey temp_key; |
| EXPECT_EQ(ERROR_SUCCESS, |
| @@ -94,7 +96,7 @@ |
| system_install_ = false; |
| // Shotgun approach to clearing out data we may have written. |
| - TempRegKeyOverride::DeleteAllTempKeys(); |
| + ScopedRegistryKeyOverride::DeleteAllTempKeys(); |
|
Paweł Hajdan Jr.
2011/08/22 19:42:58
And this doesn't use the cleanup scoper. Could you
Roger Tawa OOO till Jul 10th
2011/08/22 20:19:17
This code properly handles cleanup of the temp reg
|
| testing::Test::TearDown(); |
| } |