summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/contextual_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/unit/contextual_worker.js')
-rw-r--r--js/xpconnect/tests/unit/contextual_worker.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/contextual_worker.js b/js/xpconnect/tests/unit/contextual_worker.js
new file mode 100644
index 0000000000..a6344daf1e
--- /dev/null
+++ b/js/xpconnect/tests/unit/contextual_worker.js
@@ -0,0 +1,14 @@
+onmessage = event => {
+ const ns1 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
+ global: "current",
+ });
+
+ const ns2 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
+ global: "contextual",
+ });
+
+ const equal1 = ns1 == ns2;
+ const equal2 = ns1.obj == ns2.obj;
+
+ postMessage({ equal1, equal2 });
+};