Backed out changeset 06f41c22f3a6 (bug 1888460) for causing linux xpcshell failures...
[gecko.git] / dom / workers / test / test_404.html
blob59ab691e0277d6a68ec8f8e8d325a345fed3c419
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 Threads
9 -->
10 <head>
11 <title>Test for DOM Worker Threads</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 <pre id="test">
17 <script class="testbody" type="text/javascript">
19 var worker = new Worker("nonexistent_worker.js");
21 worker.onmessage = function(event) {
22 ok(false, "Shouldn't ever get a message!");
23 SimpleTest.finish();
26 worker.onerror = function(event) {
27 is(event.target, worker);
28 event.preventDefault();
29 SimpleTest.finish();
32 worker.postMessage("dummy");
34 SimpleTest.waitForExplicitFinish();
36 </script>
37 </pre>
38 </body>
39 </html>