summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/from/wrap-new-global.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/Iterator/from/wrap-new-global.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/tests/non262/Iterator/from/wrap-new-global.js b/js/src/tests/non262/Iterator/from/wrap-new-global.js
new file mode 100644
index 0000000000..a9a26b41b0
--- /dev/null
+++ b/js/src/tests/non262/Iterator/from/wrap-new-global.js
@@ -0,0 +1,9 @@
+// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
+const otherGlobal = newGlobal({newCompartment: true});
+
+const iter = [1, 2, 3].values();
+assertEq(iter, Iterator.from(iter));
+assertEq(iter !== otherGlobal.Iterator.from(iter), true);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0, 0);