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

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

Issue 1308943005: [NetInfo] Add Blink support for connection.change, connection.downlinkMax, and wimax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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 | « LayoutTests/netinfo/multiple-frames.html ('k') | LayoutTests/netinfo/resources/web-worker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/netinfo/resources/netinfo_common.js
diff --git a/LayoutTests/netinfo/resources/netinfo_common.js b/LayoutTests/netinfo/resources/netinfo_common.js
index 07b0617832cddb9a049244fe0156429d3fda7e18..57e3c45dbb900469f8e26a8143963197d5680536 100644
--- a/LayoutTests/netinfo/resources/netinfo_common.js
+++ b/LayoutTests/netinfo/resources/netinfo_common.js
@@ -1,10 +1,14 @@
window.jsTestIsAsync = true;
+var connection = navigator.connection;
+var initialType = "bluetooth";
+var initialDownlinkMax = 1.0;
+var newConnectionType = "ethernet";
+var newDownlinkMax = 2.0;
+
// Suppress connection messages information from the host.
if (window.internals) {
internals.setNetworkStateNotifierTestOnly(true);
+ internals.setNetworkConnectionInfo(initialType, initialDownlinkMax);
}
-var connection = navigator.connection;
-var initialType = connection.type;
-var newConnectionType = connection.type == "bluetooth" ? "ethernet" : "bluetooth";
« no previous file with comments | « LayoutTests/netinfo/multiple-frames.html ('k') | LayoutTests/netinfo/resources/web-worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698