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 000000000000000..0d559999f3faf8b --- /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 000000000000000..6bfd29e8c74b509 --- /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 000000000000000..beb7c6467b2417b --- /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 000000000000000..369ce77b0b62af8 --- /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 000000000000000..586c8ba38764656 --- /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 000000000000000..724fb8b0e1158e7 --- /dev/null +++ b/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-success.js @@ -0,0 +1,17 @@ +"use strict"; +importScripts("/resources/testharness.js"); + +console.log("what is wrong with shared workers"); + +test(() => { + console.log("got here?! 1111"); + const sab = new SharedArrayBuffer(16); + const ta = new Int32Array(sab); + + console.log("got here?!"); + + // Test passes if this doesn't throw + Atomics.wait(ta, 0, 0, 10); +}, `[[CanBlock]] in a ${self.constructor.name}`); + +done(); diff --git a/resources b/resources index bf0e213dcfb5b3f..7649b7796e4f750 160000 --- a/resources +++ b/resources @@ -1 +1 @@ -Subproject commit bf0e213dcfb5b3f12e5c3c73b692b7326fc88f47 +Subproject commit 7649b7796e4f75085d2910dfb9ce38fd9b76f7bf