summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/S15.4.2.1_A1.1_T1.js
diff options
context:
space:
mode:
authorBrian Terlson <brian.terlson@microsoft.com>2014-12-05 15:50:00 -0800
committerBrian Terlson <brian.terlson@microsoft.com>2014-12-07 15:33:09 -0800
commit2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8 (patch)
tree7315f60ffd86513bf163c05e4252fab0810bfbe8 /test/built-ins/Array/S15.4.2.1_A1.1_T1.js
parentda465e7399bcecd3c78fa1f5e898c9d52b4c7096 (diff)
downloadqtdeclarative-testsuites-2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8.tar.gz
Reorganize ./test
Diffstat (limited to 'test/built-ins/Array/S15.4.2.1_A1.1_T1.js')
-rw-r--r--test/built-ins/Array/S15.4.2.1_A1.1_T1.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/built-ins/Array/S15.4.2.1_A1.1_T1.js b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js
new file mode 100644
index 000000000..ada18b040
--- /dev/null
+++ b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The [[Prototype]] property of the newly constructed object
+ is set to the original Array prototype object, the one that
+ is the initial value of Array.prototype
+es5id: 15.4.2.1_A1.1_T1
+description: >
+ Create new property of Array.prototype. When new Array object has
+ this property
+---*/
+
+//CHECK#1
+Array.prototype.myproperty = 1;
+var x = new Array();
+if (x.myproperty !== 1) {
+ $ERROR('#1: Array.prototype.myproperty = 1; var x = new Array(); x.myproperty === 1. Actual: ' + (x.myproperty));
+}
+
+//CHECK#2
+if (x.hasOwnProperty('myproperty') !== false) {
+ $ERROR('#2: Array.prototype.myproperty = 1; var x = new Array(); x.hasOwnProperty(\'myproperty\') === false. Actual: ' + (x.hasOwnProperty('myproperty')));
+}