summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/non_shared_1.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/unit/non_shared_1.mjs')
-rw-r--r--js/xpconnect/tests/unit/non_shared_1.mjs19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/non_shared_1.mjs b/js/xpconnect/tests/unit/non_shared_1.mjs
new file mode 100644
index 0000000000..9b909c134a
--- /dev/null
+++ b/js/xpconnect/tests/unit/non_shared_1.mjs
@@ -0,0 +1,19 @@
+import { setGlobal } from "./non_shared_2.mjs";
+
+globalThis["loaded"].push(1);
+
+globalThis["counter"] = 0;
+
+let counter = 0;
+
+export function getCounter() {
+ return counter;
+}
+
+export function incCounter() {
+ counter++;
+}
+
+export function putCounter() {
+ setGlobal("counter", counter);
+}