diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-dedicatedworker.html b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-dedicatedworker.html new file mode 100644 index 00000000000000..0d559999f3faf8 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-dedicatedworker.html @@ -0,0 +1,13 @@ + + +[[CanBlock]] in a dedicated worker agent + + + + + + + diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.html b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.html new file mode 100644 index 00000000000000..6bfd29e8c74b50 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.html @@ -0,0 +1,14 @@ + + +[[CanBlock]] in a service worker agent + + + + + + + + diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-sharedworker.html b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-sharedworker.html new file mode 100644 index 00000000000000..beb7c6467b2417 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-sharedworker.html @@ -0,0 +1,13 @@ + + +[[CanBlock]] in a shared worker agent + + + + + + + diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-window.html b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-window.html new file mode 100644 index 00000000000000..369ce77b0b62af --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-window.html @@ -0,0 +1,21 @@ + + +[[CanBlock]] in a similar-origin window agent + + + + + + + diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-failure.js b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-failure.js new file mode 100644 index 00000000000000..586c8ba3876465 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-failure.js @@ -0,0 +1,13 @@ +"use strict"; +importScripts("/resources/testharness.js"); + +test(() => { + const sab = new SharedArrayBuffer(16); + const ta = new Int32Array(sab); + + assert_throws(new TypeError(), () => { + Atomics.wait(ta, 0, 0, 10); + }); +}, `[[CanBlock]] in a ${self.constructor.name}`); + +done(); diff --git a/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-success.js b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-success.js new file mode 100644 index 00000000000000..2ed54143ee5572 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-success.js @@ -0,0 +1,11 @@ +"use strict"; +importScripts("/resources/testharness.js"); + +test(() => { + const sab = new SharedArrayBuffer(16); + const ta = new Int32Array(sab); + + assert_equals(Atomics.wait(ta, 0, 0, 10), "timed-out"); +}, `[[CanBlock]] in a ${self.constructor.name}`); + +done();