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

Unified Diff: third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation.html

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/estimate-basic-operation.html
diff --git a/third_party/WebKit/LayoutTests/netinfo/basic-operation.html b/third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation.html
similarity index 64%
copy from third_party/WebKit/LayoutTests/netinfo/basic-operation.html
copy to third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation.html
index ad3d6109cfb662774c691328fce95a0f9ce60ff0..e83c08456df8019ed708da05155fa6c63173f45f 100644
--- a/third_party/WebKit/LayoutTests/netinfo/basic-operation.html
+++ b/third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation.html
@@ -21,20 +21,26 @@ var typeChangeListener = function(e) {
shouldBe("typeof connection.type", '"string"');
shouldBe('connection.type', 'initialType');
shouldBe('connection.downlinkMax', 'initialDownlinkMax');
+ shouldBe('connection.effectiveType', 'initialEffectiveType');
+ shouldBe('connection.rtt', 'initialRtt');
+ shouldBe('connection.downlink', 'initialDownlink');
finishJSTest();
}
var changeListener = function(e) {
shouldBe("typeof connection.type", '"string"');
- shouldBe('connection.type', 'newConnectionType');
- shouldBe('connection.downlinkMax', 'newDownlinkMax');
+ shouldBe('connection.type', 'initialType');
+ shouldBe('connection.downlinkMax', 'initialDownlinkMax');
+ shouldBe('connection.effectiveType', 'newEffectiveType');
+ shouldBe('connection.rtt', 'newRtt');
+ shouldBe('connection.downlink', 'newDownlink');
connection.removeEventListener('change', changeListener);
connection.addEventListener('typechange', typeChangeListener);
- internals.setNetworkConnectionInfoOverride(isTypeOnline(initialType), initialType, initialDownlinkMax);
+ internals.setNetworkQualityInfoOverride(initialEffectiveType, initialRtt, initialDownlink);
}
connection.addEventListener('change', changeListener);
-internals.setNetworkConnectionInfoOverride(isTypeOnline(newConnectionType), newConnectionType, newDownlinkMax);
+internals.setNetworkQualityInfoOverride(newEffectiveType, newRtt, newDownlink);
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698