Index: test/mjsunit/es6/array-iterator.js |
diff --git a/test/mjsunit/es6/array-iterator.js b/test/mjsunit/es6/array-iterator.js |
index b24ee5712fb71c595014189b2258a776e80381a7..96122cd9999941155e457a6b664c917389512c13 100644 |
--- a/test/mjsunit/es6/array-iterator.js |
+++ b/test/mjsunit/es6/array-iterator.js |
@@ -45,11 +45,8 @@ function assertHasOwnProperty(object, name, attrs) { |
function TestArrayPrototype() { |
assertHasOwnProperty(Array.prototype, 'entries', DONT_ENUM); |
- assertHasOwnProperty(Array.prototype, 'values', DONT_ENUM); |
assertHasOwnProperty(Array.prototype, 'keys', DONT_ENUM); |
assertHasOwnProperty(Array.prototype, Symbol.iterator, DONT_ENUM); |
- |
- assertEquals(Array.prototype.values, Array.prototype[Symbol.iterator]); |
} |
TestArrayPrototype(); |
@@ -61,7 +58,7 @@ function assertIteratorResult(value, done, result) { |
function TestValues() { |
var array = ['a', 'b', 'c']; |
- var iterator = array.values(); |
+ var iterator = array[Symbol.iterator](); |
assertIteratorResult('a', false, iterator.next()); |
assertIteratorResult('b', false, iterator.next()); |
assertIteratorResult('c', false, iterator.next()); |
@@ -75,7 +72,7 @@ TestValues(); |
function TestValuesMutate() { |
var array = ['a', 'b', 'c']; |
- var iterator = array.values(); |
+ var iterator = array[Symbol.iterator](); |
assertIteratorResult('a', false, iterator.next()); |
assertIteratorResult('b', false, iterator.next()); |
assertIteratorResult('c', false, iterator.next()); |
@@ -142,17 +139,17 @@ TestEntriesMutate(); |
function TestArrayIteratorPrototype() { |
var array = []; |
- var iterator = array.values(); |
+ var iterator = array.keys(); |
var ArrayIteratorPrototype = iterator.__proto__; |
- assertEquals(ArrayIteratorPrototype, array.values().__proto__); |
+ assertEquals(ArrayIteratorPrototype, array[Symbol.iterator]().__proto__); |
assertEquals(ArrayIteratorPrototype, array.keys().__proto__); |
assertEquals(ArrayIteratorPrototype, array.entries().__proto__); |
assertEquals(Object.prototype, ArrayIteratorPrototype.__proto__); |
- assertEquals('Array Iterator', %_ClassOf(array.values())); |
+ assertEquals('Array Iterator', %_ClassOf(array[Symbol.iterator]())); |
assertEquals('Array Iterator', %_ClassOf(array.keys())); |
assertEquals('Array Iterator', %_ClassOf(array.entries())); |
@@ -169,7 +166,7 @@ function TestForArrayValues() { |
var buffer = []; |
var array = [0, 'a', true, false, null, /* hole */, undefined, NaN]; |
var i = 0; |
- for (var value of array.values()) { |
+ for (var value of array[Symbol.iterator]()) { |
buffer[i++] = value; |
} |
@@ -239,7 +236,7 @@ TestForArrayValues(); |
function TestNonOwnSlots() { |
var array = [0]; |
- var iterator = array.values(); |
+ var iterator = array[Symbol.iterator](); |
var object = {__proto__: iterator}; |
assertThrows(function() { |