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

Unified Diff: third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js

Issue 2087293003: [DevTools] Network.emulateNetworkConditions now affects NetworkStateNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments Created 4 years, 6 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: third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
diff --git a/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js b/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
index efaa164b0623189666756b98673d44213f06bb8d..c47ad46b6382eeed77e2ba2a0ff34c0b1812bdc8 100644
--- a/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
+++ b/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
@@ -8,12 +8,14 @@ var newDownlinkMax = 2.0;
// Suppress connection messages information from the host.
if (window.internals) {
- internals.setNetworkStateNotifierTestOnly(true);
- internals.setNetworkConnectionInfo(initialType, initialDownlinkMax);
+ internals.setNetworkConnectionInfoOverride(true, initialType, initialDownlinkMax);
// Reset the state of the singleton network state notifier.
window.addEventListener('beforeunload', function() {
allada 2016/06/28 22:34:15 (please fix here too)
- internals.setNetworkStateNotifierTestOnly(false);
+ internals.clearNetworkConnectionInfoOverride();
}, false);
}
+function isTypeOnline(type) {
+ return type != 'none';
allada 2016/06/28 22:34:14 nit: double quotes
dgozman 2016/06/29 01:17:33 Single quotes are the common style in netinfo test
+}

Powered by Google App Engine
This is Rietveld 408576698