summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js')
-rw-r--r--js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js b/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js
new file mode 100644
index 0000000000..ee2ef412c6
--- /dev/null
+++ b/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js
@@ -0,0 +1,13 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * https://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+var global = newGlobal();
+var array = new global.Int8Array(10);
+
+assertEq(array.find(v => v == 1), undefined)
+assertEq(array.findIndex(v => v == 0), 0)
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);