aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/typed-array-iterator.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/typed-array-iterator.js')
-rw-r--r--deps/v8/test/mjsunit/es6/typed-array-iterator.js33
1 files changed, 16 insertions, 17 deletions
diff --git a/deps/v8/test/mjsunit/es6/typed-array-iterator.js b/deps/v8/test/mjsunit/es6/typed-array-iterator.js
index 9903b0abae..0b27625c5c 100644
--- a/deps/v8/test/mjsunit/es6/typed-array-iterator.js
+++ b/deps/v8/test/mjsunit/es6/typed-array-iterator.js
@@ -9,23 +9,22 @@ var constructors = [Uint8Array, Int8Array,
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));
-
- assertFalse(constructor.prototype.propertyIsEnumerable('entries'));
- assertFalse(constructor.prototype.propertyIsEnumerable('values'));
- assertFalse(constructor.prototype.propertyIsEnumerable('keys'));
- assertFalse(constructor.prototype.propertyIsEnumerable(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);
+var TypedArrayPrototype = Uint8Array.prototype.__proto__;
+
+assertTrue(TypedArrayPrototype.hasOwnProperty('entries'));
+assertTrue(TypedArrayPrototype.hasOwnProperty('values'));
+assertTrue(TypedArrayPrototype.hasOwnProperty('keys'));
+assertTrue(TypedArrayPrototype.hasOwnProperty(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]);
function TestTypedArrayValues(constructor) {