2 <title>Test for Worker importScripts
</title>
3 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
7 <script id=
"worker" type=
"javascript/worker">
8 onmessage = async function(msg) {
10 self.importScripts(
"N:",
"");
18 SimpleTest
.waitForExplicitFinish();
19 document
.addEventListener("DOMContentLoaded", async () => {
20 const blob
= new Blob([document
.querySelector('#worker').textContent
],
21 {type
: "text/javascript"});
22 const worker
= new Worker(window
.URL
.createObjectURL(blob
));
23 worker
.postMessage([], []);
24 worker
.onmessage = function(e
) {
25 if (e
.data
== "done") {