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

Unified Diff: LayoutTests/netinfo/multiple-frames.html

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/connection-types-expected.txt ('k') | LayoutTests/netinfo/resources/netinfo_common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/netinfo/multiple-frames.html
diff --git a/LayoutTests/netinfo/multiple-frames.html b/LayoutTests/netinfo/multiple-frames.html
index 930130fed7fcd50357b686dd40b7657c1aa9b8c0..f74d953f91163d9aba6805766a14e8e7f409b440 100644
--- a/LayoutTests/netinfo/multiple-frames.html
+++ b/LayoutTests/netinfo/multiple-frames.html
@@ -25,7 +25,9 @@ var hasChildFrameEventFired = false;
function mainFrameListener() {
hasMainFrameEventFired = true;
if (connection.type != newConnectionType)
- testFailed("Event fired event but type not yet changed.");
+ testFailed("Event fired but type not yet changed.");
+ if (connection.downlinkMax != newDownlinkMax)
+ testFailed("Event fired but downlinkMax not yet changed.");
if (!hasChildFrameEventFired && childConnection.type != initialType)
testFailed("Child frame connection type changed before firing its event.");
maybeFinishTest();
@@ -35,6 +37,8 @@ function childFrameListener() {
hasChildFrameEventFired = true;
if (childConnection.type != newConnectionType)
testFailed("Child frame fired event but type not yet changed.");
+ if (childConnection.downlinkMax != newDownlinkMax)
+ testFailed("Child frame fired event but downlinkMax not yet changed.");
if (!hasMainFrameEventFired && connection.type != initialType)
testFailed("Main frame connection type changed before firing its event.");
maybeFinishTest();
@@ -46,10 +50,10 @@ function maybeFinishTest() {
}
}
-connection.addEventListener('typechange', mainFrameListener);
-childConnection.addEventListener('typechange', childFrameListener);
+connection.addEventListener('change', mainFrameListener);
+childConnection.addEventListener('change', childFrameListener);
-internals.setNetworkConnectionInfo(newConnectionType);
+internals.setNetworkConnectionInfo(newConnectionType, newDownlinkMax);
</script>
</body>
« no previous file with comments | « LayoutTests/netinfo/connection-types-expected.txt ('k') | LayoutTests/netinfo/resources/netinfo_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698