From 1dba4fdce28f7e19b76530b476ee341fc9b28eb6 Mon Sep 17 00:00:00 2001 From: Yoshi Cheng-Hao Huang Date: Mon, 7 Aug 2023 14:39:51 +0000 Subject: [PATCH] Bug 1828992: test. r=jonco Depends on D175912 Differential Revision: https://phabricator.services.mozilla.com/D175943 --- dom/workers/test/mochitest.ini | 2 ++ .../test_dynamicImport_and_terminate.html | 34 +++++++++++++++++++ dom/workers/test/worker_dynamicImport.mjs | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 dom/workers/test/test_dynamicImport_and_terminate.html create mode 100644 dom/workers/test/worker_dynamicImport.mjs diff --git a/dom/workers/test/mochitest.ini b/dom/workers/test/mochitest.ini index e1fe2c4f567f..06fe84d38351 100644 --- a/dom/workers/test/mochitest.ini +++ b/dom/workers/test/mochitest.ini @@ -150,6 +150,8 @@ skip-if = true # bug 1176225 [test_dataURLWorker.html] [test_dynamicImport.html] [test_dynamicImport_early_termination.html] +[test_dynamicImport_and_terminate.html] +support-files = worker_dynamicImport.mjs [test_errorPropagation.html] skip-if = http3 diff --git a/dom/workers/test/test_dynamicImport_and_terminate.html b/dom/workers/test/test_dynamicImport_and_terminate.html new file mode 100644 index 000000000000..cf355572e64c --- /dev/null +++ b/dom/workers/test/test_dynamicImport_and_terminate.html @@ -0,0 +1,34 @@ + + + + + Test for Worker create script loader failure + + + + +

+ +
+
+
+ + diff --git a/dom/workers/test/worker_dynamicImport.mjs b/dom/workers/test/worker_dynamicImport.mjs new file mode 100644 index 000000000000..b5c50d30f7ce --- /dev/null +++ b/dom/workers/test/worker_dynamicImport.mjs @@ -0,0 +1,2 @@ +/* eslint-disable import/no-unresolved */ +const { o } = await import("./404.js");