15.2.3.6-4-290-1.js (1169B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.6-4-290-1 6 description: > 7 Object.defineProperty - 'O' is an Arguments object of a function 8 that has formal parameters, 'name' is own property which is 9 defined in both [[ParameterMap]] of 'O' and 'O', is deleted 10 afterwards, and 'desc' is accessor descriptor, test 'name' is 11 redefined in 'O' with all correct attribute values (10.6 12 [[DefineOwnProperty]] step 3) 13 includes: [propertyHelper.js] 14 ---*/ 15 16 (function(a, b, c) { 17 delete arguments[0]; 18 19 function getFunc() { 20 return 10; 21 } 22 23 function setFunc(value) { 24 this.setVerifyHelpProp = value; 25 } 26 Object.defineProperty(arguments, "0", { 27 get: getFunc, 28 set: setFunc, 29 enumerable: true, 30 configurable: true 31 }); 32 if (a !== 0) { 33 throw new Test262Error('Expected a === 0, actually ' + a); 34 } 35 36 verifyEqualTo(arguments, "0", getFunc()); 37 38 verifyWritable(arguments, "0", "setVerifyHelpProp"); 39 40 verifyProperty(arguments, "0", { 41 enumerable: true, 42 configurable: true, 43 }); 44 }(0, 1, 2)); 45 46 reportCompare(0, 0);