|
1 <!-- |
|
2 Any copyright is dedicated to the Public Domain. |
|
3 http://creativecommons.org/publicdomain/zero/1.0/ |
|
4 --> |
|
5 <html> |
|
6 <head> |
|
7 <title>Test for DOM Worker Threads</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body> |
|
12 <pre id="test"> |
|
13 <script class="testbody" type="text/javascript"> |
|
14 |
|
15 var worker = new Worker("newError_worker.js"); |
|
16 |
|
17 worker.onmessage = function(event) { |
|
18 ok(false, "Shouldn't get a message!"); |
|
19 SimpleTest.finish(); |
|
20 } |
|
21 |
|
22 worker.onerror = function(event) { |
|
23 is(event.message, "Error: foo!", "Got wrong error message!"); |
|
24 event.preventDefault(); |
|
25 SimpleTest.finish(); |
|
26 } |
|
27 |
|
28 SimpleTest.waitForExplicitFinish(); |
|
29 |
|
30 </script> |
|
31 </pre> |
|
32 </body> |
|
33 </html> |
|
34 |