summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js')
-rw-r--r--test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js b/test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js
index 8ee2fba54..b2716b242 100644
--- a/test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js
+++ b/test/built-ins/TypedArrays/typedarray-arg-detached-when-species-retrieved-different-type.js
@@ -31,31 +31,31 @@ features: [TypedArray, Symbol.species]
---*/
testWithTypedArrayConstructors(function(TA) {
- var speciesCallCount = 0;
- var bufferConstructor = Object.defineProperty({}, Symbol.species, {
- get: function() {
- speciesCallCount += 1;
- $DETACHBUFFER(ta.buffer);
- return speciesConstructor;
- }
- });
-
- var prototypeCallCount = 0;
- var speciesConstructor = Object.defineProperty(function(){}.bind(), "prototype", {
- get: function() {
- prototypeCallCount += 1;
- return null;
- }
- });
-
- var ta = new TA(0);
- ta.buffer.constructor = bufferConstructor;
-
- assert.throws(TypeError, function() {
- var targetType = TA !== Int32Array ? Int32Array : Uint32Array;
- new targetType(ta);
- }, "TypeError thrown for detached source buffer");
-
- assert.sameValue(speciesCallCount, 1, "@@species getter called once");
- assert.sameValue(prototypeCallCount, 1, "prototype getter called once");
+ var speciesCallCount = 0;
+ var bufferConstructor = Object.defineProperty({}, Symbol.species, {
+ get: function() {
+ speciesCallCount += 1;
+ $DETACHBUFFER(ta.buffer);
+ return speciesConstructor;
+ }
+ });
+
+ var prototypeCallCount = 0;
+ var speciesConstructor = Object.defineProperty(function() {}.bind(), "prototype", {
+ get: function() {
+ prototypeCallCount += 1;
+ return null;
+ }
+ });
+
+ var ta = new TA(0);
+ ta.buffer.constructor = bufferConstructor;
+
+ assert.throws(TypeError, function() {
+ var targetType = TA !== Int32Array ? Int32Array : Uint32Array;
+ new targetType(ta);
+ }, "TypeError thrown for detached source buffer");
+
+ assert.sameValue(speciesCallCount, 1, "@@species getter called once");
+ assert.sameValue(prototypeCallCount, 1, "prototype getter called once");
});