Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
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">
15 var worker = new Worker("newError_worker.js");
17 worker.onmessage = function(event) {
18 ok(false, "Shouldn't get a message!");
19 SimpleTest.finish();
20 }
22 worker.onerror = function(event) {
23 is(event.message, "Error: foo!", "Got wrong error message!");
24 event.preventDefault();
25 SimpleTest.finish();
26 }
28 SimpleTest.waitForExplicitFinish();
30 </script>
31 </pre>
32 </body>
33 </html>