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

Side by Side Diff: test/mjsunit/es6/collection-iterator.js

Issue 427723002: Enable ES6 Map and Set by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove old test, fix BUILD.gn Created 6 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/debug-script.js ('k') | test/mjsunit/es6/collections.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-collections --allow-natives-syntax 5 // Flags: --allow-natives-syntax
6 6
7 7
8 (function TestSetIterator() { 8 (function TestSetIterator() {
9 var s = new Set; 9 var s = new Set;
10 var iter = s.values(); 10 var iter = s.values();
11 assertEquals('Set Iterator', %_ClassOf(iter)); 11 assertEquals('Set Iterator', %_ClassOf(iter));
12 12
13 var SetIteratorPrototype = iter.__proto__; 13 var SetIteratorPrototype = iter.__proto__;
14 assertFalse(SetIteratorPrototype.hasOwnProperty('constructor')); 14 assertFalse(SetIteratorPrototype.hasOwnProperty('constructor'));
15 assertEquals(SetIteratorPrototype.__proto__, Object.prototype); 15 assertEquals(SetIteratorPrototype.__proto__, Object.prototype);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 (function TestMapIteratorSymbol() { 192 (function TestMapIteratorSymbol() {
193 assertEquals(Map.prototype[Symbol.iterator], Map.prototype.entries); 193 assertEquals(Map.prototype[Symbol.iterator], Map.prototype.entries);
194 assertTrue(Map.prototype.hasOwnProperty(Symbol.iterator)); 194 assertTrue(Map.prototype.hasOwnProperty(Symbol.iterator));
195 assertFalse(Map.prototype.propertyIsEnumerable(Symbol.iterator)); 195 assertFalse(Map.prototype.propertyIsEnumerable(Symbol.iterator));
196 196
197 var iter = new Map().values(); 197 var iter = new Map().values();
198 assertEquals(iter, iter[Symbol.iterator]()); 198 assertEquals(iter, iter[Symbol.iterator]());
199 assertEquals(iter[Symbol.iterator].name, '[Symbol.iterator]'); 199 assertEquals(iter[Symbol.iterator].name, '[Symbol.iterator]');
200 })(); 200 })();
OLDNEW
« no previous file with comments | « test/mjsunit/debug-script.js ('k') | test/mjsunit/es6/collections.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698