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

Unified Diff: chrome/browser/extensions/lazy_background_page_apitest.cc

Issue 2847313002: Update some host_resolver()->AddRules in chrome/browser. (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
Index: chrome/browser/extensions/lazy_background_page_apitest.cc
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc
index ead2b674f09d0d7c095f033f3e39b4411708470a..13d5473025d5d2b13ca13c92ff13989b5a5cba1a 100644
--- a/chrome/browser/extensions/lazy_background_page_apitest.cc
+++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -110,6 +110,11 @@ class LazyBackgroundPageApiTest : public ExtensionApiTest {
command_line->AppendSwitch(::switches::kNoProxyServer);
}
+ void SetUpOnMainThread() override {
+ ExtensionApiTest::SetUpOnMainThread();
+ host_resolver()->AddRule("*", "127.0.0.1");
+ }
+
// Loads the extension, which temporarily starts the lazy background page
// to dispatch the onInstalled event. We wait until it shuts down again.
const Extension* LoadExtensionAndWait(const std::string& test_name) {
@@ -284,7 +289,6 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, WaitForView) {
// Tests that the lazy background page stays alive until all network requests
// are complete.
IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, WaitForRequest) {
- host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(StartEmbeddedTestServer());
LazyBackgroundObserver page_complete;
@@ -636,8 +640,8 @@ class LazyBackgroundPageIsolatedExtensionsApiTest
LazyBackgroundPageIsolatedExtensionsApiTest() {}
~LazyBackgroundPageIsolatedExtensionsApiTest() override {}
- void SetUpInProcessBrowserTestFixture() override {
- LazyBackgroundPageApiTest::SetUpInProcessBrowserTestFixture();
+ void SetUpOnMainThread() override {
+ LazyBackgroundPageApiTest::SetUpOnMainThread();
// This is needed to allow example.com to actually resolve and load in
// tests.
« no previous file with comments | « chrome/browser/extensions/isolated_app_browsertest.cc ('k') | chrome/browser/extensions/native_bindings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698