10.6-7-1.js (813B)
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: 10.6-7-1 6 description: > 7 Arguments Object has length as its own property and does not 8 invoke the setter defined on Object.prototype.length (Step 7) 9 includes: [propertyHelper.js] 10 ---*/ 11 12 var data = "data"; 13 var getFunc = function () { 14 return 12; 15 }; 16 17 var setFunc = function (value) { 18 data = value; 19 }; 20 21 Object.defineProperty(Object.prototype, "length", { 22 get: getFunc, 23 set: setFunc, 24 configurable: true 25 }); 26 27 var argObj = (function () { return arguments })(); 28 29 verifyProperty(argObj, "length", { 30 value: 0, 31 writable: true, 32 enumerable: false, 33 configurable: true, 34 }); 35 36 assert.sameValue(data, "data", 'data'); 37 38 reportCompare(0, 0);