summaryrefslogtreecommitdiffstats
path: root/dom/fs/test/xpcshell/worker/head.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/fs/test/xpcshell/worker/head.js')
-rw-r--r--dom/fs/test/xpcshell/worker/head.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/fs/test/xpcshell/worker/head.js b/dom/fs/test/xpcshell/worker/head.js
new file mode 100644
index 0000000000..06a779841f
--- /dev/null
+++ b/dom/fs/test/xpcshell/worker/head.js
@@ -0,0 +1,22 @@
+/**
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+async function require_module(id) {
+ if (!require_module.moduleLoader) {
+ importScripts("/dom/quota/test/modules/worker/ModuleLoader.js");
+
+ const base = location.href;
+
+ const depth = "../../../../../";
+
+ importScripts("/dom/quota/test/modules/worker/Assert.js");
+
+ importScripts("/dom/quota/test/modules/worker/Utils.js");
+
+ require_module.moduleLoader = new globalThis.ModuleLoader(base, depth);
+ }
+
+ return require_module.moduleLoader.require(id);
+}