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

Unified Diff: test/mjsunit/es6/typed-array-iterator.js

Issue 1558663002: Reland of Use ES2015-style TypedArray prototype chain (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/mjsunit/es6/classes-subclass-builtins.js ('k') | test/mjsunit/es6/typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/typed-array-iterator.js
diff --git a/test/mjsunit/es6/typed-array-iterator.js b/test/mjsunit/es6/typed-array-iterator.js
index 9903b0abaee75cb4cda98b246d5899f9d50450b0..0b27625c5c3ab0d1c6e1ad37f037eda6053baeda 100644
--- a/test/mjsunit/es6/typed-array-iterator.js
+++ b/test/mjsunit/es6/typed-array-iterator.js
@@ -9,23 +9,22 @@
Float32Array, Float64Array,
Uint8ClampedArray];
-function TestTypedArrayPrototype(constructor) {
- assertTrue(constructor.prototype.hasOwnProperty('entries'));
- assertTrue(constructor.prototype.hasOwnProperty('values'));
- assertTrue(constructor.prototype.hasOwnProperty('keys'));
- assertTrue(constructor.prototype.hasOwnProperty(Symbol.iterator));
+var TypedArrayPrototype = Uint8Array.prototype.__proto__;
- assertFalse(constructor.prototype.propertyIsEnumerable('entries'));
- assertFalse(constructor.prototype.propertyIsEnumerable('values'));
- assertFalse(constructor.prototype.propertyIsEnumerable('keys'));
- assertFalse(constructor.prototype.propertyIsEnumerable(Symbol.iterator));
+assertTrue(TypedArrayPrototype.hasOwnProperty('entries'));
+assertTrue(TypedArrayPrototype.hasOwnProperty('values'));
+assertTrue(TypedArrayPrototype.hasOwnProperty('keys'));
+assertTrue(TypedArrayPrototype.hasOwnProperty(Symbol.iterator));
- assertEquals(Array.prototype.entries, constructor.prototype.entries);
- assertEquals(Array.prototype[Symbol.iterator], constructor.prototype.values);
- assertEquals(Array.prototype.keys, constructor.prototype.keys);
- assertEquals(Array.prototype[Symbol.iterator], constructor.prototype[Symbol.iterator]);
-}
-constructors.forEach(TestTypedArrayPrototype);
+assertFalse(TypedArrayPrototype.propertyIsEnumerable('entries'));
+assertFalse(TypedArrayPrototype.propertyIsEnumerable('values'));
+assertFalse(TypedArrayPrototype.propertyIsEnumerable('keys'));
+assertFalse(TypedArrayPrototype.propertyIsEnumerable(Symbol.iterator));
+
+assertEquals(Array.prototype.entries, TypedArrayPrototype.entries);
+assertEquals(Array.prototype[Symbol.iterator], TypedArrayPrototype.values);
+assertEquals(Array.prototype.keys, TypedArrayPrototype.keys);
+assertEquals(Array.prototype[Symbol.iterator], TypedArrayPrototype[Symbol.iterator]);
function TestTypedArrayValues(constructor) {
« no previous file with comments | « test/mjsunit/es6/classes-subclass-builtins.js ('k') | test/mjsunit/es6/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698