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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc

Issue 2851103002: Update some host_resolver()->AddRules in chrome/browser. (Closed)
Patch Set: fix Created 3 years, 8 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/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/login/login_handler_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
index acbfd81c9e4f710061e3d2f16f21404e79ada145..777d60e44c889628c6a87c6ef3e4c3cf189c36c2 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
@@ -82,6 +82,14 @@ class ContentSettingsMixedScriptIgnoreCertErrorsTest
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
}
+
+ void SetUpOnMainThread() override {
+ ContentSettingBubbleModelMixedScriptTest::SetUpOnMainThread();
+ // Rappor treats local hostnames a little bit special (e.g. records
+ // "127.0.0.1" as "localhost"), so use a non-local hostname for
+ // convenience.
+ host_resolver()->AddRule("*", "127.0.0.1");
+ }
};
// Tests that a MIXEDSCRIPT type ContentSettingBubbleModel records UMA
@@ -95,10 +103,6 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsMixedScriptIgnoreCertErrorsTest,
MainFrameMetrics) {
GURL url(https_server_->GetURL("/content_setting_bubble/mixed_script.html"));
- // Rappor treats local hostnames a little bit special (e.g. records
- // "127.0.0.1" as "localhost"), so use a non-local hostname for
- // convenience.
- host_resolver()->AddRule("*", "127.0.0.1");
GURL::Replacements replace_host;
replace_host.SetHostStr("example.test");
url = url.ReplaceComponents(replace_host);
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/login/login_handler_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698