diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/workers/semantics/run-a-worker | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/workers/semantics/run-a-worker')
3 files changed, 67 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/semantics/run-a-worker/001.html b/testing/web-platform/tests/workers/semantics/run-a-worker/001.html new file mode 100644 index 000000000..aa0fc67ef --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/run-a-worker/001.html @@ -0,0 +1,22 @@ +<!-- +postMessage(this === self); + +/* +--> +<!doctype html> +<title>worker global scope, dedicated worker</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +async_test(function() { + var worker = new Worker('#'); + worker.onmessage = this.step_func(function(e) { + assert_true(e.data); + this.done(); + }); +}); +</script> +<!-- +*/ +//-->
\ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/run-a-worker/002.html b/testing/web-platform/tests/workers/semantics/run-a-worker/002.html new file mode 100644 index 000000000..3617ad727 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/run-a-worker/002.html @@ -0,0 +1,24 @@ +<!-- +var passed = this === self; +onconnect = function(e) { + e.ports[0].postMessage(passed); +} +/* +--> +<!doctype html> +<title>worker global scope, shared worker</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +async_test(function() { + var worker = new SharedWorker('#'); + worker.port.onmessage = this.step_func(function(e) { + assert_true(e.data); + this.done(); + }); +}); +</script> +<!-- +*/ +//-->
\ No newline at end of file diff --git a/testing/web-platform/tests/workers/semantics/run-a-worker/003.html b/testing/web-platform/tests/workers/semantics/run-a-worker/003.html new file mode 100644 index 000000000..8c2f07ee7 --- /dev/null +++ b/testing/web-platform/tests/workers/semantics/run-a-worker/003.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>handling for 404 response</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +setup({allow_uncaught_exception: true}); + +async_test(function() { + var worker = new Worker('404_worker'); + worker.onerror = this.step_func(function(e) { this.done(); }); +}, 'worker'); + +async_test(function() { + var shared = new SharedWorker('404_shared'); + // NOTE: this handler will not fire, as runtime scripting errors + // are not forwarded to SharedWorker objects, but instead reported to the user directly. + shared.onerror = this.step_func(function(e) { assert_unreached(); }, shared, 'error'); + step_timeout(this.step_func(function() { this.done(); }), 5000); +}, 'shared'); +</script> |