diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js new file mode 100644 index 0000000000..0b42ea1e50 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js @@ -0,0 +1,22 @@ +// META: global=dedicatedworker,sharedworker +// META: script=./resources/evaluation-order-setup.js + +// Spec: https://html.spec.whatwg.org/C/#run-a-classic-script +// called from https://html.spec.whatwg.org/C/#import-scripts-into-worker-global-scope +setupTest("importScripts() queueing a microtask then throwing an exception", [ + // Step 6 of #run-a-classic-script. + "body", + + // Step 7.1.1 ("Clean up after running script") is no-op because JavaScript + // execution context stack is still non-empty immediately after + // importScripts() as the outer script is still executing. + + // Step 7.1.2 (Rethrowing an exception) causes worker onerror. + "global-error", + + // Microtask checkpoint is performed later, perhaps + // "Clean up after running script" after the outer script is finished. + "microtask", +]); + +importScripts('./resources/evaluation-order-1-throw.js'); |