summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/webapi/esm-integration/worker.tentative.html
blob: 6145dd04ff8c8d33600570e63bc2bce871417420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<title>Testing WebAssembly worker</title>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type=module>
setup({ single_test: true });
const worker = new Worker("resources/worker.wasm", { type: "module" });
worker.onmessage = (msg) => {
  assert_equals(msg, 42);
  done();
}
worker.onerror = () => {
  assert_unreached("worker got an error");
}
</script>