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

Unified Diff: content/test/browser_test_utils_browsertest.cc

Issue 2838293002: Ensure all content_browsertests call the host resolver in SetUpOnMainThread and not after. (Closed)
Patch Set: 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 | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/browser_test_utils_browsertest.cc
diff --git a/content/test/browser_test_utils_browsertest.cc b/content/test/browser_test_utils_browsertest.cc
index 9303cd3d9a1d781e7e78efc07a9ca69bb112b11a..a59ef49de9014cdf3adc9f427e268b7803d65266 100644
--- a/content/test/browser_test_utils_browsertest.cc
+++ b/content/test/browser_test_utils_browsertest.cc
@@ -47,12 +47,16 @@ class NavigationObserver: public WebContentsObserver {
class CrossSiteRedirectorBrowserTest : public ContentBrowserTest {
public:
CrossSiteRedirectorBrowserTest() {}
+
+ void SetUpOnMainThread() override {
+ // Map all hosts to localhost and setup the EmbeddedTestServer for
+ // redirects.
+ host_resolver()->AddRule("*", "127.0.0.1");
+ }
};
IN_PROC_BROWSER_TEST_F(CrossSiteRedirectorBrowserTest,
VerifyCrossSiteRedirectURL) {
- // Map all hosts to localhost and setup the EmbeddedTestServer for redirects.
- host_resolver()->AddRule("*", "127.0.0.1");
SetupCrossSiteRedirector(embedded_test_server());
ASSERT_TRUE(embedded_test_server()->Start());
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698