Backed out changeset 06f41c22f3a6 (bug 1888460) for causing linux xpcshell failures...
[gecko.git] / dom / workers / test / test_consoleReplaceable.html
blobb8a60411e47743e45fd45d012ad301390402ead2
1 <!--
2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
4 -->
5 <!DOCTYPE HTML>
6 <html>
7 <!--
8 Tests of DOM Worker Console
9 -->
10 <head>
11 <title>Test for DOM Worker Console</title>
12 <script src="/tests/SimpleTest/SimpleTest.js"></script>
13 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
14 </head>
15 <body>
16 <p id="display"></p>
17 <div id="content" style="display: none">
19 </div>
20 <pre id="test">
21 <script class="testbody" language="javascript">
22 var worker = new Worker("consoleReplaceable_worker.js");
24 worker.onmessage = function(event) {
25 is(event.target, worker, "Worker and target match!");
26 ok(event.data.status, event.data.event);
28 if (event.data.last)
29 SimpleTest.finish();
32 worker.onerror = function(event) {
33 ok(false, "Worker had an error: " + event.message);
34 SimpleTest.finish();
37 worker.postMessage(true);
39 SimpleTest.waitForExplicitFinish();
41 </script>
42 </pre>
43 </body>
44 </html>