S15.4.1_A1.1_T1.js (778B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 The [[Prototype]] property of the newly constructed object 7 is set to the original Array prototype object, the one that 8 is the initial value of Array.prototype 9 es5id: 15.4.1_A1.1_T1 10 description: > 11 Create new property of Array.prototype. When new Array object has 12 this property 13 ---*/ 14 15 Array.prototype.myproperty = 42; 16 var x = Array(); 17 assert.sameValue(x.myproperty, 42, 'The value of x.myproperty is expected to be 42'); 18 19 assert.sameValue( 20 Object.prototype.hasOwnProperty.call(x, 'myproperty'), 21 false, 22 'Object.prototype.hasOwnProperty.call(Array(), "myproperty") must return false' 23 ); 24 25 reportCompare(0, 0);