Lines Matching refs:Symbol
44 function indirectSymbol() { return Symbol() }
48 symbols.push(Symbol())
49 symbols.push(Symbol(undefined))
50 symbols.push(Symbol("66"))
51 symbols.push(Symbol(66))
52 symbols.push(Symbol().valueOf())
59 assertThrows(function () { Symbol(Symbol()) }, TypeError)
60 assertThrows(function () { new Symbol(66) }, TypeError)
78 assertSame(Object.prototype, Symbol.prototype.__proto__)
79 assertSame(Symbol.prototype, Symbol().__proto__)
80 assertSame(Symbol.prototype, Object(Symbol()).__proto__)
82 assertSame(Symbol.prototype, symbols[i].__proto__)
89 assertSame(Function.prototype, Symbol.__proto__)
90 assertFalse(Object === Symbol.prototype.constructor)
91 assertFalse(Symbol === Object.prototype.constructor)
92 assertSame(Symbol, Symbol.prototype.constructor)
93 assertSame(Symbol, Symbol().__proto__.constructor)
94 assertSame(Symbol, Object(Symbol()).__proto__.constructor)
96 assertSame(Symbol, symbols[i].__proto__.constructor)
106 assertTrue(Symbol.prototype.valueOf.call(Object(symbols[i])) === symbols[i])
107 assertTrue(Symbol.prototype.valueOf.call(symbols[i]) === symbols[i])
122 isValidSymbolString(Symbol.prototype.toString.call(symbols[i])))
234 Symbol.prototype.getThisProto = function () {
239 assertTrue(symbols[i].getThisProto() === Symbol.prototype)
409 var key = Symbol("key");
456 var desc = Object.getOwnPropertyDescriptor(Symbol, name)
463 assertFalse(Symbol.for("Symbol." + name) === desc.value)
464 assertTrue(Symbol.keyFor(desc.value) === undefined)
471 var symbol1 = Symbol.for("x1")
472 var symbol2 = Symbol.for("x2")
475 assertSame(symbol1, Symbol.for("x1"))
476 assertSame(symbol2, Symbol.for("x2"))
477 assertSame("x1", Symbol.keyFor(symbol1))
478 assertSame("x2", Symbol.keyFor(symbol2))
480 assertSame(Symbol.for("1"), Symbol.for(1))
481 assertThrows(function() { Symbol.keyFor("bla") }, TypeError)
482 assertThrows(function() { Symbol.keyFor({}) }, TypeError)
485 assertFalse(Symbol === Realm.eval(realm, "Symbol"))
486 assertFalse(Symbol.for === Realm.eval(realm, "Symbol.for"))
487 assertFalse(Symbol.keyFor === Realm.eval(realm, "Symbol.keyFor"))
488 assertSame(Symbol.create, Realm.eval(realm, "Symbol.create"))
489 assertSame(Symbol.iterator, Realm.eval(realm, "Symbol.iterator"))
500 assertSame(symbol3, Symbol.for("x3"))
501 assertSame("x3", Symbol.keyFor(symbol3))