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

Unified Diff: third_party/WebKit/LayoutTests/netinfo/web-worker.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/web-worker.html
diff --git a/third_party/WebKit/LayoutTests/netinfo/web-worker.html b/third_party/WebKit/LayoutTests/netinfo/web-worker.html
index cdb0c1d6325cc6da4eb6bc99c0f9ec91370aa23d..c5569c9c50ad5126ce20fb3cbe84384db91b60e5 100644
--- a/third_party/WebKit/LayoutTests/netinfo/web-worker.html
+++ b/third_party/WebKit/LayoutTests/netinfo/web-worker.html
@@ -17,17 +17,19 @@ var msg_count = 0;
worker.addEventListener('message', function(e) {
if (msg_count == 0) {
- if (e.data != connection.type + ',' + connection.downlinkMax) {
+ if (e.data != connection.type + ',' + connection.downlinkMax + ',' + connection.effectiveType + ',' + connection.rtt + ',' + connection.downlink) {
testFailed("Worker type disagrees with main frame.");
}
internals.setNetworkConnectionInfoOverride(isTypeOnline(newConnectionType), newConnectionType, newDownlinkMax);
} else if (msg_count == 1) {
- if (e.data != newConnectionType + ',' + newDownlinkMax)
+ if (e.data != newConnectionType + ',' + newDownlinkMax + ',' + connection.effectiveType + ',' + connection.rtt + ',' + connection.downlink) {
testFailed("Worker switched to wrong connection type.");
+ }
internals.setNetworkConnectionInfoOverride(isTypeOnline(initialType), initialType, initialDownlinkMax);
} else if (msg_count == 2) {
- if (e.data != initialType + ',' + initialDownlinkMax)
+ if (e.data != initialType + ',' + initialDownlinkMax + ',' + connection.effectiveType + ',' + connection.rtt + ',' + connection.downlink) {
testFailed("Worker did not revert back to initial type.");
+ }
finishJSTest();
}
msg_count += 1;

Powered by Google App Engine
This is Rietveld 408576698