diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-14 08:49:15 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-14 08:49:15 +0200 |
commit | b2ec36808a240cd8169190168c915cd0463f8c87 (patch) | |
tree | f20af67fd25c3aab72d24a4dc0df3a587f085525 /js/src/jit-test/tests | |
parent | 7d38fbd5e1fdae628c9b2c54060885bdeca248c1 (diff) | |
download | UXP-b2ec36808a240cd8169190168c915cd0463f8c87.tar UXP-b2ec36808a240cd8169190168c915cd0463f8c87.tar.gz UXP-b2ec36808a240cd8169190168c915cd0463f8c87.tar.lz UXP-b2ec36808a240cd8169190168c915cd0463f8c87.tar.xz UXP-b2ec36808a240cd8169190168c915cd0463f8c87.zip |
Bug 1326453 - Part 1: Remove @@iterator method from module namespace objects per ES2017
Diffstat (limited to 'js/src/jit-test/tests')
-rw-r--r-- | js/src/jit-test/tests/modules/import-namespace.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/js/src/jit-test/tests/modules/import-namespace.js b/js/src/jit-test/tests/modules/import-namespace.js index f44d4568a..94a48461d 100644 --- a/js/src/jit-test/tests/modules/import-namespace.js +++ b/js/src/jit-test/tests/modules/import-namespace.js @@ -64,25 +64,6 @@ assertEq(typeof desc.get, "undefined"); assertEq(typeof desc.set, "undefined"); assertEq(Object.prototype.toString.call(ns), "[object Module]"); -// Test @@iterator method. -let iteratorFun = ns[Symbol.iterator]; -assertEq(iteratorFun.name, "[Symbol.iterator]"); - -let iterator = ns[Symbol.iterator](); -assertEq(iterator[Symbol.iterator](), iterator); -assertIteratorNext(iterator, "a"); -assertIteratorNext(iterator, "b"); -assertIteratorDone(iterator); - -// The iterator's next method can only be called on the object it was originally -// associated with. -iterator = ns[Symbol.iterator](); -let iterator2 = ns[Symbol.iterator](); -assertThrowsInstanceOf(() => iterator.next.call({}), TypeError); -assertThrowsInstanceOf(() => iterator.next.call(iterator2), TypeError); -assertEq(iterator.next.call(iterator).value, "a"); -assertEq(iterator2.next.call(iterator2).value, "a"); - // Test cyclic namespace import and access in module evaluation. let c = moduleRepo['c'] = parseModule("export let c = 1; import * as ns from 'd'; let d = ns.d;"); |