diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/BigInt/prototype/valueOf/cross-realm.js')
-rw-r--r-- | js/src/tests/test262/built-ins/BigInt/prototype/valueOf/cross-realm.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/BigInt/prototype/valueOf/cross-realm.js b/js/src/tests/test262/built-ins/BigInt/prototype/valueOf/cross-realm.js new file mode 100644 index 0000000000..96cb49dd2f --- /dev/null +++ b/js/src/tests/test262/built-ins/BigInt/prototype/valueOf/cross-realm.js @@ -0,0 +1,16 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-bigint.prototype.valueof +description: valueOf called with a BigInt object from another realm +features: [BigInt, cross-realm] +---*/ + +var other = $262.createRealm().global; +var wrapped = other.Object(other.BigInt(0)); + +assert.sameValue(BigInt.prototype.valueOf.call(wrapped), 0n, + "cross-realm valueOf"); + +reportCompare(0, 0); |