Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Unified Diff: test/mjsunit/modules-namespace1.js

Issue 2578053003: [modules] Remove @@iterator on namespace objects. (Closed)
Patch Set: Skip out-of-date tests262 tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/modules-namespace1.js
diff --git a/test/mjsunit/modules-namespace1.js b/test/mjsunit/modules-namespace1.js
index 29ade5d0957b74632305b76d94362b4dde675e7e..6f0876aa195ce0f5c3bb74f1319e19c597e9fb10 100644
--- a/test/mjsunit/modules-namespace1.js
+++ b/test/mjsunit/modules-namespace1.js
@@ -22,8 +22,7 @@ assertTrue(Reflect.setPrototypeOf(foo, null));
assertFalse(Reflect.setPrototypeOf(foo, {}));
assertSame(null, Reflect.getPrototypeOf(foo));
assertEquals(
- ["bla", "foo_again", "yo", Symbol.toStringTag, Symbol.iterator],
- Reflect.ownKeys(foo));
+ ["bla", "foo_again", "yo", Symbol.toStringTag], Reflect.ownKeys(foo));
// Its "yo" property.
assertEquals(
@@ -50,40 +49,6 @@ assertEquals(
{value: "Module", configurable: true, writable: false, enumerable: false},
Reflect.getOwnPropertyDescriptor(foo, Symbol.toStringTag));
-// Its @@iterator property.
-assertTrue(Reflect.has(foo, Symbol.iterator));
-assertEquals("function", typeof Reflect.get(foo, Symbol.iterator));
-assertEquals("[Symbol.iterator]", foo[Symbol.iterator].name);
-assertEquals(0, foo[Symbol.iterator].length);
-assertSame(Function.prototype, foo[Symbol.iterator].__proto__);
-assertEquals(
- {value: foo[Symbol.iterator],
- configurable: true, writable: true, enumerable: false},
- Reflect.getOwnPropertyDescriptor(foo, Symbol.iterator));
-assertEquals(["bla", "foo_again", "yo"], [...foo]);
-assertThrows(() => (42, foo[Symbol.iterator])(), TypeError);
-{
- let it = foo[Symbol.iterator]();
- assertSame(it.__proto__, ([][Symbol.iterator]()).__proto__.__proto__);
- assertEquals(["next"], Reflect.ownKeys(it));
- assertEquals(
- {value: it.next, configurable: true, writable: true, enumerable: false},
- Reflect.getOwnPropertyDescriptor(it, "next"));
- assertEquals("function", typeof it.next);
- assertEquals("next", it.next.name);
- assertEquals(0, it.next.length);
- assertSame(Function.prototype, it.next.__proto__);
- assertFalse(it === foo[Symbol.iterator]());
- assertFalse(it.next === foo[Symbol.iterator]().next);
- assertThrows(() => (42, it.next)(), TypeError);
- assertThrows(() => it.next.call(foo[Symbol.iterator]()), TypeError);
- let next = it.next;
- assertEquals(42, (it.next = 42, it.next));
- assertEquals(43, (it.bla = 43, it.bla));
- assertTrue(delete it.next);
- assertThrows(() => next.call(foo[Symbol.iterator]()), TypeError);
-}
-
// TODO(neis): Clarify spec w.r.t. other symbols.
// Nonexistant properties.
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | test/mjsunit/modules-namespace2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698