| Index: LayoutTests/netinfo/connection-types.html
|
| diff --git a/LayoutTests/netinfo/connection-types.html b/LayoutTests/netinfo/connection-types.html
|
| index e3353586c4f33faa99ac2db8b019772d4aaec777..896e103143576a156eb29f7268ce4ac08d2a8d09 100644
|
| --- a/LayoutTests/netinfo/connection-types.html
|
| +++ b/LayoutTests/netinfo/connection-types.html
|
| @@ -11,24 +11,34 @@ if (!window.internals)
|
| log("This test requires window.internals");
|
|
|
| var types = [
|
| - 'cellular',
|
| - 'bluetooth',
|
| - 'ethernet',
|
| - 'wifi',
|
| - 'other',
|
| - 'none',
|
| - 'unknown'
|
| + ['cellular', 1.0],
|
| + ['bluetooth', 2.0],
|
| + ['ethernet', 3.0],
|
| + ['wifi', 4.0],
|
| + ['wimax', 5.0],
|
| + ['other', 6.0],
|
| + ['none', 7.0],
|
| + ['unknown', 8.0]
|
| ];
|
|
|
| -var count = 0;
|
| +// ontypechange is deprecated but this test is here to
|
| +// verify that it still works until it is removed.
|
| connection.addEventListener('typechange', function(e) {
|
| - shouldBe('connection.type', 'types[count]');
|
| + shouldBe('connection.type', 'types[count][0]');
|
| + shouldBe('connection.downlinkMax', 'types[count][1]');
|
| +});
|
| +
|
| +var count = 0;
|
| +connection.addEventListener('change', function(e) {
|
| + shouldBe('connection.type', 'types[count][0]');
|
| + shouldBe('connection.downlinkMax', 'types[count][1]');
|
| +
|
| if (++count === types.length)
|
| finishJSTest();
|
| });
|
|
|
| for(var i = 0; i < types.length; i++)
|
| - internals.setNetworkConnectionInfo(types[i]);
|
| + internals.setNetworkConnectionInfo(types[i][0], types[i][1]);
|
|
|
| </script>
|
| </body>
|
|
|