diff --git a/test/built-ins/TypedArray/prototype/buffer/return-dataview-buffer.js b/test/built-ins/TypedArray/prototype/buffer/return-dataview-buffer.js deleted file mode 100644 index 05992e520e..0000000000 --- a/test/built-ins/TypedArray/prototype/buffer/return-dataview-buffer.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 22.2.3.1 -description: | - Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot -info: > - 22.2.3.1 get %TypedArray%.prototype.buffer - - ... - 4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot. - 5. Return buffer. -includes: [testTypedArray.js] -features: [DataView] ----*/ - -var getter = Object.getOwnPropertyDescriptor( - TypedArray.prototype, "buffer" -).get; - -var buffer = new ArrayBuffer(8); -var dv = new DataView(buffer, 0); - -assert.sameValue(getter.call(dv), buffer); diff --git a/test/built-ins/TypedArray/prototype/buffer/this-has-no-viewedarraybuffer-internal.js b/test/built-ins/TypedArray/prototype/buffer/this-has-no-typedarrayname-internal.js similarity index 69% rename from test/built-ins/TypedArray/prototype/buffer/this-has-no-viewedarraybuffer-internal.js rename to test/built-ins/TypedArray/prototype/buffer/this-has-no-typedarrayname-internal.js index 8939cad810..93b54064f2 100644 --- a/test/built-ins/TypedArray/prototype/buffer/this-has-no-viewedarraybuffer-internal.js +++ b/test/built-ins/TypedArray/prototype/buffer/this-has-no-typedarrayname-internal.js @@ -1,19 +1,21 @@ // Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- +esid: sec-get-%typedarray%.prototype.buffer es6id: 22.2.3.1 description: | - Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]] + Throws a TypeError exception when `this` does not have a [[TypedArrayName]] internal slot info: > 22.2.3.1 get %TypedArray%.prototype.buffer 1. Let O be the this value. 2. If Type(O) is not Object, throw a TypeError exception. - 3. If O does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError + 3. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError exception. ... includes: [testTypedArray.js] +features: [DataView] ---*/ var TypedArrayPrototype = TypedArray.prototype; @@ -33,3 +35,8 @@ var ab = new ArrayBuffer(8); assert.throws(TypeError, function() { getter.call(ab); }); + +var dv = new DataView(new ArrayBuffer(8), 0); +assert.throws(TypeError, function() { + getter.call(dv); +}); diff --git a/test/built-ins/TypedArray/prototype/byteLength/return-dataview-bytelength.js b/test/built-ins/TypedArray/prototype/byteLength/return-dataview-bytelength.js deleted file mode 100644 index 8f1930d0d0..0000000000 --- a/test/built-ins/TypedArray/prototype/byteLength/return-dataview-bytelength.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 22.2.3.2 -description: | - Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot -info: > - 22.2.3.2 get %TypedArray%.prototype.byteLength - - ... - 6. Let size be the value of O's [[ByteLength]] internal slot. - 7. Return size. -includes: [testTypedArray.js] -features: [DataView] ----*/ - -var getter = Object.getOwnPropertyDescriptor( - TypedArray.prototype, "byteLength" -).get; - -var buffer = new ArrayBuffer(64); -var dv = new DataView(buffer, 0); - -assert.sameValue(getter.call(dv), 64); diff --git a/test/built-ins/TypedArray/prototype/byteLength/this-has-no-viewedarraybuffer-internal.js b/test/built-ins/TypedArray/prototype/byteLength/this-has-no-typedarrayname-internal.js similarity index 69% rename from test/built-ins/TypedArray/prototype/byteLength/this-has-no-viewedarraybuffer-internal.js rename to test/built-ins/TypedArray/prototype/byteLength/this-has-no-typedarrayname-internal.js index 935c86c03d..dd2fc0950f 100644 --- a/test/built-ins/TypedArray/prototype/byteLength/this-has-no-viewedarraybuffer-internal.js +++ b/test/built-ins/TypedArray/prototype/byteLength/this-has-no-typedarrayname-internal.js @@ -1,19 +1,21 @@ // Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- +esid: sec-get-%typedarray%.prototype.bytelength es6id: 22.2.3.2 description: | - Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]] + Throws a TypeError exception when `this` does not have a [[TypedArrayName]] internal slot info: > 22.2.3.2 get %TypedArray%.prototype.byteLength 1. Let O be the this value. 2. If Type(O) is not Object, throw a TypeError exception. - 3. If O does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError + 3. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError exception. ... includes: [testTypedArray.js] +features: [DataView] ---*/ var TypedArrayPrototype = TypedArray.prototype; @@ -33,3 +35,8 @@ var ab = new ArrayBuffer(8); assert.throws(TypeError, function() { getter.call(ab); }); + +var dv = new DataView(new ArrayBuffer(8), 0); +assert.throws(TypeError, function() { + getter.call(dv); +}); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/return-dataview-byteoffset.js b/test/built-ins/TypedArray/prototype/byteOffset/return-dataview-byteoffset.js deleted file mode 100644 index 916514a5c5..0000000000 --- a/test/built-ins/TypedArray/prototype/byteOffset/return-dataview-byteoffset.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 22.2.3.2 -description: | - Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot -info: > - 22.2.3.2 get %TypedArray%.prototype.byteOffset - - ... - 6. Let offset be the value of O's [[ByteOffset]] internal slot. - 7. Return size. -includes: [testTypedArray.js] -features: [DataView] ----*/ - -var getter = Object.getOwnPropertyDescriptor( - TypedArray.prototype, "byteOffset" -).get; - -var buffer = new ArrayBuffer(64); - -var dv1 = new DataView(buffer, 0); -assert.sameValue(getter.call(dv1), 0); - -var dv2 = new DataView(buffer, 32); -assert.sameValue(getter.call(dv2), 32); diff --git a/test/built-ins/TypedArray/prototype/byteOffset/this-has-no-viewedarraybuffer-internal.js b/test/built-ins/TypedArray/prototype/byteOffset/this-has-no-typedarrayname-internal.js similarity index 69% rename from test/built-ins/TypedArray/prototype/byteOffset/this-has-no-viewedarraybuffer-internal.js rename to test/built-ins/TypedArray/prototype/byteOffset/this-has-no-typedarrayname-internal.js index a444fdbf14..321c872f1f 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/this-has-no-viewedarraybuffer-internal.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/this-has-no-typedarrayname-internal.js @@ -1,19 +1,21 @@ // Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- +esid: sec-get-%typedarray%.prototype.byteoffset es6id: 22.2.3.3 description: | - Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]] + Throws a TypeError exception when `this` does not have a [[TypedArrayName]] internal slot info: > 22.2.3.3 get %TypedArray%.prototype.byteOffset 1. Let O be the this value. 2. If Type(O) is not Object, throw a TypeError exception. - 3. If O does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError + 3. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError exception. ... includes: [testTypedArray.js] +features: [DataView] ---*/ var TypedArrayPrototype = TypedArray.prototype; @@ -33,3 +35,8 @@ var ab = new ArrayBuffer(8); assert.throws(TypeError, function() { getter.call(ab); }); + +var dv = new DataView(new ArrayBuffer(8), 0); +assert.throws(TypeError, function() { + getter.call(dv); +});