4 https://bugzilla.mozilla.org/show_bug.cgi?id=1127206
8 <title>Test for Bug
1127206</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
13 /** Test for Bug
1127206 **/
14 SimpleTest.waitForExplicitFinish();
16 `try { new File({}); }
18 postMessage(
"throwing on random object");
20 try { new File(new Blob([
"abc"])); }
22 postMessage(
"throwing on Blob");
24 try { new File(
"abc"); }
26 postMessage(
"throwing on string");
28 postMessage('finishTest')`]);
29 var url = URL.createObjectURL(blob);
30 var w = new Worker(url);
31 var expectedResults = [
32 "throwing on random object",
37 w.onmessage = function(e) {
38 if (curIndex == expectedResults.length) {
39 is(e.data,
"finishTest",
"What message is this?");
42 is(e.data, expectedResults[curIndex],
43 "Message " + (curIndex +
1) +
" should be correct");
50 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1127206">Mozilla Bug
1127206</a>
52 <div id=
"content" style=
"display: none">