diff --git a/js/src/tests/ecma_6/Array/getter-name.js b/js/src/tests/ecma_6/Array/getter-name.js new file mode 100644 index 00000000000..27e9b76acf4 --- /dev/null +++ b/js/src/tests/ecma_6/Array/getter-name.js @@ -0,0 +1,10 @@ +var BUGNUMBER = 1180290; +var summary = 'Array getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +// FIXME: bug 1165052 +// assertEq(Object.getOwnPropertyDescriptor(Array, Symbol.species).get.name, "get [Symbol.species]"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/ArrayBuffer/getter-name.js b/js/src/tests/ecma_6/ArrayBuffer/getter-name.js new file mode 100644 index 00000000000..462c74342b6 --- /dev/null +++ b/js/src/tests/ecma_6/ArrayBuffer/getter-name.js @@ -0,0 +1,11 @@ +var BUGNUMBER = 1180290; +var summary = 'ArrayBuffer getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +// FIXME: bug 1165053 +// assertEq(Object.getOwnPropertyDescriptor(ArrayBuffer, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get.name, "get byteLength"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/DataView/getter-name.js b/js/src/tests/ecma_6/DataView/getter-name.js new file mode 100644 index 00000000000..600b7da8b37 --- /dev/null +++ b/js/src/tests/ecma_6/DataView/getter-name.js @@ -0,0 +1,11 @@ +var BUGNUMBER = 1180290; +var summary = 'DataView getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +assertEq(Object.getOwnPropertyDescriptor(DataView.prototype, "buffer").get.name, "get buffer"); +assertEq(Object.getOwnPropertyDescriptor(DataView.prototype, "byteLength").get.name, "get byteLength"); +assertEq(Object.getOwnPropertyDescriptor(DataView.prototype, "byteOffset").get.name, "get byteOffset"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/Map/getter-name.js b/js/src/tests/ecma_6/Map/getter-name.js new file mode 100644 index 00000000000..08f7890c755 --- /dev/null +++ b/js/src/tests/ecma_6/Map/getter-name.js @@ -0,0 +1,10 @@ +var BUGNUMBER = 1180290; +var summary = 'Map getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +assertEq(Object.getOwnPropertyDescriptor(Map, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(Map.prototype, "size").get.name, "get size"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/Object/getter-name.js b/js/src/tests/ecma_6/Object/getter-name.js new file mode 100644 index 00000000000..601d6b47784 --- /dev/null +++ b/js/src/tests/ecma_6/Object/getter-name.js @@ -0,0 +1,10 @@ +var BUGNUMBER = 1180290; +var summary = 'Object accessors should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +assertEq(Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").get.name, "get __proto__"); +assertEq(Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set.name, "set __proto__"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/RegExp/getter-name.js b/js/src/tests/ecma_6/RegExp/getter-name.js new file mode 100644 index 00000000000..c2f2ab838d6 --- /dev/null +++ b/js/src/tests/ecma_6/RegExp/getter-name.js @@ -0,0 +1,17 @@ +var BUGNUMBER = 1180290; +var summary = 'RegExp getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +// FIXME: bug 887016 +// assertEq(Object.getOwnPropertyDescriptor(RegExp, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "flags").get.name, "get flags"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "global").get.name, "get global"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase").get.name, "get ignoreCase"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline").get.name, "get multiline"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "source").get.name, "get source"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "sticky").get.name, "get sticky"); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, "unicode").get.name, "get unicode"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/Set/getter-name.js b/js/src/tests/ecma_6/Set/getter-name.js new file mode 100644 index 00000000000..9a3e84fa45b --- /dev/null +++ b/js/src/tests/ecma_6/Set/getter-name.js @@ -0,0 +1,10 @@ +var BUGNUMBER = 1180290; +var summary = 'Set getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +assertEq(Object.getOwnPropertyDescriptor(Set, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(Set.prototype, "size").get.name, "get size"); + +if (typeof reportCompare === 'function') + reportCompare(true, true); diff --git a/js/src/tests/ecma_6/TypedArray/getter-name.js b/js/src/tests/ecma_6/TypedArray/getter-name.js new file mode 100644 index 00000000000..308aa09564a --- /dev/null +++ b/js/src/tests/ecma_6/TypedArray/getter-name.js @@ -0,0 +1,18 @@ +var BUGNUMBER = 1180290; +var summary = 'TypedArray getters should have get prefix'; + +print(BUGNUMBER + ": " + summary); + +let TypedArray = Object.getPrototypeOf(Float32Array.prototype).constructor; + +// FIXME: bug 1165053 +// assertEq(Object.getOwnPropertyDescriptor(TypedArray, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.name, "get buffer"); +assertEq(Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.name, "get byteLength"); +assertEq(Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.name, "get byteOffset"); +assertEq(Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.name, "get length"); +// FIXME: bug 1114580 +// assertEq(Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.name, "get [Symbol.toStringTag]"); + +if (typeof reportCompare === 'function') + reportCompare(true, true);