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

Unified Diff: content/browser/net_info_browsertest.cc

Issue 1255263002: Remove a race around NetworkChangeNotifier::test_notifications_only_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Possible iOS fix Created 5 years, 5 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: content/browser/net_info_browsertest.cc
diff --git a/content/browser/net_info_browsertest.cc b/content/browser/net_info_browsertest.cc
index fb805f3ec40b623f7e65bf3ccab0f2e53ded25e4..67d939176a2c0e29520bf9a4af4ff83e5a0c1211 100644
--- a/content/browser/net_info_browsertest.cc
+++ b/content/browser/net_info_browsertest.cc
@@ -20,18 +20,20 @@ class NetInfoBrowserTest : public content::ContentBrowserTest {
command_line->AppendSwitch(switches::kEnableNetworkInformation);
}
-#if defined(OS_CHROMEOS)
void SetUp() override {
+ net::NetworkChangeNotifier::SetTestNotificationsOnly(true);
+
+#if defined(OS_CHROMEOS)
// ChromeOS's NetworkChangeNotifier isn't known to content and therefore
// doesn't get created in content_browsertests. Insert a mock
// NetworkChangeNotifier.
net::NetworkChangeNotifier::CreateMock();
+#endif
+
content::ContentBrowserTest::SetUp();
}
-#endif
void SetUpOnMainThread() override {
- net::NetworkChangeNotifier::SetTestNotificationsOnly(true);
base::RunLoop().RunUntilIdle();
}
« no previous file with comments | « components/web_resource/resource_request_allowed_notifier_unittest.cc ('k') | net/base/network_change_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698