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

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

Issue 446023002: Enable ES6 iteration by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moved tests to es6, fixed duplicate ExtendArrayPrototype name in unscopables.js 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
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-iteration
6
7 5
8 function TestStringPrototypeIterator() { 6 function TestStringPrototypeIterator() {
9 assertTrue(String.prototype.hasOwnProperty(Symbol.iterator)); 7 assertTrue(String.prototype.hasOwnProperty(Symbol.iterator));
10 assertFalse("".hasOwnProperty(Symbol.iterator)); 8 assertFalse("".hasOwnProperty(Symbol.iterator));
11 assertFalse("".propertyIsEnumerable(Symbol.iterator)); 9 assertFalse("".propertyIsEnumerable(Symbol.iterator));
12 } 10 }
13 TestStringPrototypeIterator(); 11 TestStringPrototypeIterator();
14 12
15 13
16 function assertIteratorResult(value, done, result) { 14 function assertIteratorResult(value, done, result) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 TestForOf(); 80 TestForOf();
83 81
84 82
85 function TestNonOwnSlots() { 83 function TestNonOwnSlots() {
86 var iterator = ""[Symbol.iterator](); 84 var iterator = ""[Symbol.iterator]();
87 var object = {__proto__: iterator}; 85 var object = {__proto__: iterator};
88 86
89 assertThrows(function() { object.next(); }, TypeError); 87 assertThrows(function() { object.next(); }, TypeError);
90 } 88 }
91 TestNonOwnSlots(); 89 TestNonOwnSlots();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/regress/regress-crbug-248025.js ('k') | test/mjsunit/es6/typed-array-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698