diff options
Diffstat (limited to 'testing/web-platform/tests/workers/constructors/SharedWorker/name.html')
-rw-r--r-- | testing/web-platform/tests/workers/constructors/SharedWorker/name.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/constructors/SharedWorker/name.html b/testing/web-platform/tests/workers/constructors/SharedWorker/name.html new file mode 100644 index 0000000000..4531cb1b80 --- /dev/null +++ b/testing/web-platform/tests/workers/constructors/SharedWorker/name.html @@ -0,0 +1,12 @@ +<!doctype html> +<title>self.name</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +async_test(t => { + const worker = new SharedWorker('name.js', 'hello'); + worker.port.onmessage = t.step_func_done(e => { + assert_equals(e.data, 'hello'); + }); +}, 'Test self.name in a shared worker'); +</script> |