diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/TypedArray/toStringTag-cross-compartment.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/non262/TypedArray/toStringTag-cross-compartment.js b/js/src/tests/non262/TypedArray/toStringTag-cross-compartment.js new file mode 100644 index 0000000000..8f0875721c --- /dev/null +++ b/js/src/tests/non262/TypedArray/toStringTag-cross-compartment.js @@ -0,0 +1,12 @@ +const TypedArrayPrototype = Object.getPrototypeOf(Int8Array.prototype); +const {get: toStringTag} = Object.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag); + +const otherGlobal = newGlobal(); + +for (let constructor of anyTypedArrayConstructors) { + let ta = new otherGlobal[constructor.name](0); + assertEq(toStringTag.call(ta), constructor.name); +} + +if (typeof reportCompare === "function") + reportCompare(true, true); |