15.2.3.6-4-303.js (993B)
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-303 6 description: > 7 Object.defineProperty - 'O' is an Arguments object, 'name' is an 8 index named accessor property of 'O' but not defined in 9 [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 10 updating multiple attribute values of 'name' (10.6 11 [[DefineOwnProperty]] step 3) 12 includes: [propertyHelper.js] 13 ---*/ 14 15 (function() { 16 function getFunc1() { 17 return 10; 18 } 19 Object.defineProperty(arguments, "0", { 20 get: getFunc1, 21 enumerable: true, 22 configurable: true 23 }); 24 25 function getFunc2() { 26 return 20; 27 } 28 Object.defineProperty(arguments, "0", { 29 get: getFunc2, 30 enumerable: false, 31 configurable: false 32 }); 33 verifyEqualTo(arguments, "0", getFunc2()); 34 35 verifyProperty(arguments, "0", { 36 enumerable: false, 37 configurable: false, 38 }); 39 }()); 40 41 reportCompare(0, 0);