mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add some test cases involving Symbol.iterator as a prelude to bug 918828. no_r=me, testonly.
--HG-- extra : rebase_source : 545cd0c1618b7f453c3afa2baa8eb4d860e7e6d2 extra : amend_source : 71045431741656cedad8832c7c690d4c96434b9a
This commit is contained in:
parent
69f454387f
commit
67358d24ca
@ -10,7 +10,8 @@ if (typeof Symbol === "function") {
|
|||||||
Symbol(),
|
Symbol(),
|
||||||
Symbol("Symbol.iterator"),
|
Symbol("Symbol.iterator"),
|
||||||
Symbol("Symbol.iterator"), // distinct new symbol with the same description
|
Symbol("Symbol.iterator"), // distinct new symbol with the same description
|
||||||
Symbol.for("Symbol.iterator")
|
Symbol.for("Symbol.iterator"),
|
||||||
|
Symbol.iterator
|
||||||
];
|
];
|
||||||
|
|
||||||
// Distinct symbols are never equal to each other, even if they have the same
|
// Distinct symbols are never equal to each other, even if they have the same
|
||||||
|
@ -22,6 +22,11 @@ if (typeof Symbol === "function") {
|
|||||||
assertEq(desc.enumerable, false);
|
assertEq(desc.enumerable, false);
|
||||||
assertEq(desc.writable, true);
|
assertEq(desc.writable, true);
|
||||||
|
|
||||||
|
desc = Object.getOwnPropertyDescriptor(Symbol, "iterator");
|
||||||
|
assertEq(desc.configurable, false);
|
||||||
|
assertEq(desc.enumerable, false);
|
||||||
|
assertEq(desc.writable, false);
|
||||||
|
|
||||||
assertEq(Symbol.for.length, 1);
|
assertEq(Symbol.for.length, 1);
|
||||||
assertEq(Symbol.prototype.toString.length, 0);
|
assertEq(Symbol.prototype.toString.length, 0);
|
||||||
assertEq(Symbol.prototype.valueOf.length, 0);
|
assertEq(Symbol.prototype.valueOf.length, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user