diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype')
6 files changed, 85 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..251f12144c --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/BYTES_PER_ELEMENT.js @@ -0,0 +1,23 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: > + The initial value of Uint8ClampedArray.prototype.BYTES_PER_ELEMENT is 1. +info: | + The value of TypedArray.prototype.BYTES_PER_ELEMENT is the Number value + of the Element Size value specified in Table 49 for TypedArray. + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. +includes: [propertyHelper.js] +features: [TypedArray] +---*/ + +assert.sameValue(Uint8ClampedArray.prototype.BYTES_PER_ELEMENT, 1); + +verifyNotEnumerable(Uint8ClampedArray.prototype, "BYTES_PER_ELEMENT"); +verifyNotWritable(Uint8ClampedArray.prototype, "BYTES_PER_ELEMENT"); +verifyNotConfigurable(Uint8ClampedArray.prototype, "BYTES_PER_ELEMENT"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/browser.js diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/constructor.js new file mode 100644 index 0000000000..bb572e729f --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/constructor.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-typedarray.prototype.constructor +description: > + The initial value of Uint8ClampedArray.prototype.constructor is the Uint8ClampedArray object. +info: | + The initial value of Uint8ClampedArray.prototype.constructor is the intrinsic + object %Uint8ClampedArray%. + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 18 through 26 and in Annex B.2 has + the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } + unless otherwise specified. +includes: [propertyHelper.js] +features: [TypedArray] +---*/ + +assert.sameValue(Uint8ClampedArray.prototype.constructor, Uint8ClampedArray); + +verifyNotEnumerable(Uint8ClampedArray.prototype, "constructor"); +verifyWritable(Uint8ClampedArray.prototype, "constructor"); +verifyConfigurable(Uint8ClampedArray.prototype, "constructor"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..c145223f14 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/not-typedarray-object.js @@ -0,0 +1,19 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: > + Uint8ClampedArray.prototype is not a TypedArray instance object. +info: | + A TypedArray prototype object is an ordinary object. It does not have + a [[ViewedArrayBuffer]] or any other of the internal slots that are + specific to TypedArray instance objects. +features: [TypedArray] +---*/ + +assert.throws(TypeError, function() { + Uint8ClampedArray.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/proto.js new file mode 100644 index 0000000000..59620ea596 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/proto.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: > + The prototype of Uint8ClampedArray.prototype is %TypedArrayPrototype%. +info: | + The value of the [[Prototype]] internal slot of a TypedArray prototype + object is the intrinsic object %TypedArrayPrototype% (22.2.3). +includes: [testTypedArray.js] +features: [TypedArray] +---*/ + +assert.sameValue(Object.getPrototypeOf(Uint8ClampedArray.prototype), TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint8ClampedArray/prototype/shell.js |