Improve test cases for network information APIs
[WebKit-https.git] / LayoutTests / networkinformation / script-tests / basic-operation.js
1 description('Tests the basic operation of NetworkInfo.');
2
3 var bandwidth = 10;
4 var metered = false;
5
6 var connection = navigator.webkitConnection;
7
8 connection.addEventListener('webkitnetworkinfochange', function() {
9     shouldBe("typeof connection.bandwidth", '"number"');
10     shouldBe("typeof connection.metered", '"boolean"');
11     finishJSTest();
12 });
13
14 internals.setNetworkInformation(document, 'webkitnetworkinfochange', bandwidth, metered);
15
16 window.jsTestIsAsync = true;