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

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

Issue 2903493002: NetInfo network quality extension: Add callbacks and Layout tests (Closed)
Patch Set: haraken comments Created 3 years, 7 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 c47ad46b6382eeed77e2ba2a0ff34c0b1812bdc8..07273363e90e91186c41471dbe2b8b3fe1e0ae27 100644
--- a/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
+++ b/third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
@@ -5,10 +5,17 @@ var initialType = "bluetooth";
var initialDownlinkMax = 1.0;
var newConnectionType = "ethernet";
var newDownlinkMax = 2.0;
+var initialEffectiveType = "3g";
+var initialRtt = 25.0;
+var initialDownlink = 10.0;
+var newEffectiveType = "4g";
+var newRtt = 50.0;
+var newDownlink = 30.0;
// Suppress connection messages information from the host.
if (window.internals) {
internals.setNetworkConnectionInfoOverride(true, initialType, initialDownlinkMax);
+ internals.setNetworkQualityInfoOverride(initialEffectiveType, initialRtt, initialDownlink);
// Reset the state of the singleton network state notifier.
window.addEventListener('beforeunload', function() {

Powered by Google App Engine
This is Rietveld 408576698