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) { |