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

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

Issue 521703002: Fix ProductTest.ProductInstallBasic and InstallerStateTest.InitializeTwice flakes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@regtest
Patch Set: robertshield fix 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
Index: chrome/installer/util/product_unittest.cc
diff --git a/chrome/installer/util/product_unittest.cc b/chrome/installer/util/product_unittest.cc
index eabade71f3d33435e8b1def74b0bf34d25321219..ea69d6e5421274e2a795ed987da35f4ebfaf8921 100644
--- a/chrome/installer/util/product_unittest.cc
+++ b/chrome/installer/util/product_unittest.cc
@@ -76,16 +76,16 @@ TEST_F(ProductTest, ProductInstallBasic) {
EXPECT_EQ(std::wstring::npos,
user_data_dir.value().find(program_files.value()));
- // There should be no installed version in the registry.
- machine_state.Initialize();
- EXPECT_TRUE(machine_state.GetProductState(
- system_level, distribution->GetType()) == NULL);
-
HKEY root = installer_state.root_key();
{
RegistryOverrideManager override_manager;
override_manager.OverrideRegistry(root, L"root_pit");
+ // There should be no installed version in the registry.
+ machine_state.Initialize();
+ EXPECT_TRUE(machine_state.GetProductState(
+ system_level, distribution->GetType()) == NULL);
+
// Let's pretend chrome is installed.
RegKey version_key(root, distribution->GetVersionKey().c_str(),
KEY_ALL_ACCESS);

Powered by Google App Engine
This is Rietveld 408576698