4 https://bugzilla.mozilla.org/show_bug.cgi?id=1003432
7 <title>Test for Bug
1003432</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1003432">Mozilla Bug
1003432</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
1003432 **/
21 // Test CustomEvent on worker
22 SimpleTest.waitForExplicitFinish();
23 var worker = new Worker(
"test_bug1003432.js");
24 ok(worker,
"Should have worker!");
27 worker.onmessage = function(evt) {
28 is(evt.data.type,
"foobar",
"Should get 'foobar' event!");
29 is(evt.data.detail,
"test",
"Detail should be 'test'.");
30 ok(evt.data.bubbles,
"Event should bubble!");
31 ok(evt.data.cancelable,
"Event should be cancelable.");
33 // wait for test results of constructor and initCustomEvent
40 worker.postMessage(
"");