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 0b27625c5c3ab0d1c6e1ad37f037eda6053baeda..9903b0abaee75cb4cda98b246d5899f9d50450b0 100644 |
--- a/test/mjsunit/es6/typed-array-iterator.js |
+++ b/test/mjsunit/es6/typed-array-iterator.js |
@@ -9,22 +9,23 @@ |
Float32Array, Float64Array, |
Uint8ClampedArray]; |
-var TypedArrayPrototype = Uint8Array.prototype.__proto__; |
+function TestTypedArrayPrototype(constructor) { |
+ assertTrue(constructor.prototype.hasOwnProperty('entries')); |
+ assertTrue(constructor.prototype.hasOwnProperty('values')); |
+ assertTrue(constructor.prototype.hasOwnProperty('keys')); |
+ assertTrue(constructor.prototype.hasOwnProperty(Symbol.iterator)); |
-assertTrue(TypedArrayPrototype.hasOwnProperty('entries')); |
-assertTrue(TypedArrayPrototype.hasOwnProperty('values')); |
-assertTrue(TypedArrayPrototype.hasOwnProperty('keys')); |
-assertTrue(TypedArrayPrototype.hasOwnProperty(Symbol.iterator)); |
+ assertFalse(constructor.prototype.propertyIsEnumerable('entries')); |
+ assertFalse(constructor.prototype.propertyIsEnumerable('values')); |
+ assertFalse(constructor.prototype.propertyIsEnumerable('keys')); |
+ assertFalse(constructor.prototype.propertyIsEnumerable(Symbol.iterator)); |
-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]); |
+ 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); |
function TestTypedArrayValues(constructor) { |