mirror of
https://github.com/tc39/test262.git
synced 2025-12-14 09:13:47 +01:00
* Add tests for prototype realm inference * Add tests for miscellaneous realm concerns * Add tests for realm of spec-created Errors In some cases, Error objects produced by the specification are observable from ECMAScript code. Among these cases, some are further differentiated in that they occur outside of any built-in function and may be triggered through syntactic production directly. The current realm record is commonly interpreted incorrectly under these circumstances. Add tests asserting that the expected realm record is used when constructing such Error objects. * Add tests for realm use in ArraySpeciesCreate * Add tests for function realm retrieval * Add tests for cross-realm behaviors of Symbols * Add tests for GetValue and PutValue * Add tests for realm of spec-created Arrays In some cases, Arrays produced by CreateArrayFromList are observable from ECMAScript code. Among these cases, two occur outside of any built-in function and may be triggered through syntactic production directly. The current realm record is commonly interpreted incorrectly under these circumstances. Add tests asserting that the expected realm record is used when constructing arrays. * Add test for spec-created object * fixup! Add tests for realm of spec-created Errors * fixup! Add tests for realm of spec-created Errors * fixup! Add tests for prototype realm inference * fixup! Add tests for miscellaneous realm concerns
20 lines
716 B
JavaScript
20 lines
716 B
JavaScript
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-symbol.keyfor
|
|
es6id: 19.4.2.5
|
|
description: Global symbol registry is shared by all realms
|
|
info: >
|
|
The GlobalSymbolRegistry is a List that is globally available. It is shared
|
|
by all realms. Prior to the evaluation of any ECMAScript code it is
|
|
initialized as a new empty List.
|
|
---*/
|
|
|
|
var OSymbol = $.createRealm().global.Symbol;
|
|
var parent = Symbol.for('parent');
|
|
var child = OSymbol.for('child');
|
|
|
|
assert.notSameValue(Symbol.keyFor, OSymbol.keyFor);
|
|
assert.sameValue(OSymbol.keyFor(parent), 'parent');
|
|
assert.sameValue(Symbol.keyFor(child), 'child');
|