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

Unified Diff: chrome/installer/gcapi/gcapi_omaha_experiment_test.cc

Issue 2692843002: Fail tests fast if overriding the Windows registry fails. (Closed)
Patch Set: sync to position 450085 Created 3 years, 10 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 | « chrome/installer/gcapi/gcapi_last_run_test.cc ('k') | chrome/installer/gcapi/gcapi_reactivation_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/gcapi/gcapi_omaha_experiment_test.cc
diff --git a/chrome/installer/gcapi/gcapi_omaha_experiment_test.cc b/chrome/installer/gcapi/gcapi_omaha_experiment_test.cc
index 958a53858397f520cb7c805672b239c53aa91410..a90207081f75b2a68180c4e6dfaa0b86b896ddc7 100644
--- a/chrome/installer/gcapi/gcapi_omaha_experiment_test.cc
+++ b/chrome/installer/gcapi/gcapi_omaha_experiment_test.cc
@@ -7,8 +7,8 @@
#include <stdint.h>
#include "base/strings/utf_string_conversions.h"
+#include "base/test/test_reg_util_win.h"
#include "chrome/installer/gcapi/gcapi.h"
-#include "chrome/installer/gcapi/gcapi_test_registry_overrider.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/google_update_settings.h"
#include "components/variations/variations_experiment_util.h"
@@ -35,6 +35,13 @@ class GCAPIOmahaExperimentTest : public ::testing::Test {
kBrand, gcapi_internals::kRelaunchLabel)) {
}
+ void SetUp() override {
+ ASSERT_NO_FATAL_FAILURE(
+ override_manager_.OverrideRegistry(HKEY_CURRENT_USER));
+ ASSERT_NO_FATAL_FAILURE(
+ override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE));
+ }
+
void VerifyExperimentLabels(const base::string16& expected_labels) {
base::string16 actual_labels;
EXPECT_TRUE(GoogleUpdateSettings::ReadExperimentLabels(false,
@@ -42,11 +49,10 @@ class GCAPIOmahaExperimentTest : public ::testing::Test {
EXPECT_EQ(expected_labels, actual_labels);
}
+ registry_util::RegistryOverrideManager override_manager_;
base::string16 brand_;
base::string16 reactivation_label_;
base::string16 relaunch_label_;
-
- const GCAPITestRegistryOverrider gcapi_test_registry_overrider_;
};
TEST_F(GCAPIOmahaExperimentTest, SetReactivationLabelFromEmptyExperiments) {
« no previous file with comments | « chrome/installer/gcapi/gcapi_last_run_test.cc ('k') | chrome/installer/gcapi/gcapi_reactivation_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698