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

Unified Diff: test/mjsunit/es6/arguments-iterator.js

Issue 647703003: Don't expose Array.prototype.values as it breaks webcompat (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/array-iterator.js ('k') | test/mjsunit/es6/array-iterator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/arguments-iterator.js
diff --git a/test/mjsunit/es6/arguments-iterator.js b/test/mjsunit/es6/arguments-iterator.js
index a65bf8bad5d6350110e3397ab9deec60a2cde998..32d4b11ee1f58427dca47bfc6a8496ad3f3e8c8b 100644
--- a/test/mjsunit/es6/arguments-iterator.js
+++ b/test/mjsunit/es6/arguments-iterator.js
@@ -16,8 +16,8 @@ function TestDirectArgumentsIteratorProperty() {
assertTrue(descriptor.writable);
assertFalse(descriptor.enumerable);
assertTrue(descriptor.configurable);
- assertEquals(descriptor.value, [].values);
- assertEquals(arguments[Symbol.iterator], [].values);
+ assertEquals(descriptor.value, [][Symbol.iterator]);
+ assertEquals(arguments[Symbol.iterator], [][Symbol.iterator]);
}
TestDirectArgumentsIteratorProperty();
@@ -26,7 +26,7 @@ function TestIndirectArgumentsIteratorProperty() {
var o = arguments;
assertTrue(o.hasOwnProperty(Symbol.iterator));
assertFalse(o.propertyIsEnumerable(Symbol.iterator));
- assertEquals(o[Symbol.iterator], [].values);
+ assertEquals(o[Symbol.iterator], [][Symbol.iterator]);
}
TestIndirectArgumentsIteratorProperty();
@@ -204,27 +204,27 @@ function TestArgumentsAsProto() {
"use strict";
var o = {__proto__:arguments};
- assertSame([].values, o[Symbol.iterator]);
+ assertSame([][Symbol.iterator], o[Symbol.iterator]);
// Make o dict-mode.
%OptimizeObjectForAddingMultipleProperties(o, 0);
assertFalse(o.hasOwnProperty(Symbol.iterator));
- assertSame([].values, o[Symbol.iterator]);
+ assertSame([][Symbol.iterator], o[Symbol.iterator]);
o[Symbol.iterator] = 10;
assertTrue(o.hasOwnProperty(Symbol.iterator));
assertEquals(10, o[Symbol.iterator]);
- assertSame([].values, arguments[Symbol.iterator]);
+ assertSame([][Symbol.iterator], arguments[Symbol.iterator]);
// Frozen o.
o = Object.freeze({__proto__:arguments});
- assertSame([].values, o[Symbol.iterator]);
+ assertSame([][Symbol.iterator], o[Symbol.iterator]);
assertFalse(o.hasOwnProperty(Symbol.iterator));
- assertSame([].values, o[Symbol.iterator]);
+ assertSame([][Symbol.iterator], o[Symbol.iterator]);
// This should throw, but currently it doesn't, because
// ExecutableAccessorInfo callbacks don't see the current strict mode.
// See note in accessors.cc:SetPropertyOnInstanceIfInherited.
o[Symbol.iterator] = 10;
assertFalse(o.hasOwnProperty(Symbol.iterator));
- assertEquals([].values, o[Symbol.iterator]);
- assertSame([].values, arguments[Symbol.iterator]);
+ assertEquals([][Symbol.iterator], o[Symbol.iterator]);
+ assertSame([][Symbol.iterator], arguments[Symbol.iterator]);
}
TestArgumentsAsProto();
« no previous file with comments | « src/array-iterator.js ('k') | test/mjsunit/es6/array-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698