Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1501)

Unified Diff: chrome/installer/util/installer_state_unittest.cc

Issue 521703002: Fix ProductTest.ProductInstallBasic and InstallerStateTest.InitializeTwice flakes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@regtest
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/util/product_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installer_state_unittest.cc
diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc
index b3db8b39bd842bbbeb32c95d4a899b15a0e71531..0a8254311c25ab315ffd5abc6caad76f56ae738b 100644
--- a/chrome/installer/util/installer_state_unittest.cc
+++ b/chrome/installer/util/installer_state_unittest.cc
@@ -603,6 +603,17 @@ TEST_F(InstallerStateTest, RemoveOldVersionDirs) {
}
TEST_F(InstallerStateTest, InitializeTwice) {
+ // Force these paths to be cached so that they can be found after the
+ // registry override manager is in place.
+ {
+ base::FilePath temp;
+ PathService::Get(base::DIR_PROGRAM_FILES, &temp);
+ PathService::Get(base::DIR_PROGRAM_FILESX86, &temp);
robertshield 2014/08/29 18:49:20 Can you instead use ScopedPathOverride to explicit
grt (UTC plus 2) 2014/08/29 18:58:31 Done.
+ }
+ registry_util::RegistryOverrideManager override_manager;
+ override_manager.OverrideRegistry(HKEY_CURRENT_USER, base::string16());
+ override_manager.OverrideRegistry(HKEY_LOCAL_MACHINE, base::string16());
+
InstallationState machine_state;
machine_state.Initialize();
« no previous file with comments | « no previous file | chrome/installer/util/product_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698