4 <title>Test for Network in workers API
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <div id=
"content" style=
"display: none">
13 <script type=
"application/javascript">
15 /** Test for Network Information API **/
17 let w = new Worker('worker_network_basics.js');
18 w.onmessage = function(e) {
19 if (e.data.type == 'status') {
20 ok(e.data.status, e.data.msg);
21 } else if (e.data.type == 'finish') {
24 ok(false,
"Unknown message type");
29 SimpleTest.waitForExplicitFinish();
30 SpecialPowers.pushPrefEnv({'set': [[
"dom.netinfo.enabled", true]]}, test);