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

Unified Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 936483002: Bring back the domain gating check for settings protection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@908473002_ps2
Patch Set: update histogram description Created 5 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
Index: chrome/browser/first_run/first_run_browsertest.cc
diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc
index 09ad85193fb41828a9ae3ce86e5820b3d488004c..df1ad1c73a8f79f300deb5ff7678c8b840d5343e 100644
--- a/chrome/browser/first_run/first_run_browsertest.cc
+++ b/chrome/browser/first_run/first_run_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
@@ -248,6 +249,9 @@ class FirstRunMasterPrefsWithTrackedPreferences
: public FirstRunMasterPrefsBrowserTestT<kWithTrackedPrefs>,
public testing::WithParamInterface<std::string> {
public:
+ FirstRunMasterPrefsWithTrackedPreferences() {}
+
+ protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
FirstRunMasterPrefsBrowserTestT::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(
@@ -255,6 +259,17 @@ class FirstRunMasterPrefsWithTrackedPreferences
std::string(chrome_prefs::internals::kSettingsEnforcementTrialName) +
"/" + GetParam() + "/");
}
+
+ void SetUpInProcessBrowserTestFixture() override {
+ FirstRunMasterPrefsBrowserTestT::SetUpInProcessBrowserTestFixture();
+
+ // Bots are on a domain, turn off the domain check for settings hardening in
+ // order to be able to test all SettingsEnforcement groups.
+ chrome_prefs::DisableDomainCheckForTesting();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsWithTrackedPreferences);
};
// http://crbug.com/314221
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | chrome/browser/prefs/chrome_pref_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698