15.2.3.7-6-a-309.js (1027B)
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.7-6-a-309 6 description: > 7 Object.defineProperties - 'O' is an Arguments object, 'P' is 8 generic own data property of 'O', test TypeError is thrown when 9 updating the [[Configurable]] attribute value of 'P' which is not 10 configurable (10.6 [[DefineOwnProperty]] step 4) 11 includes: [propertyHelper.js] 12 ---*/ 13 14 var arg = (function() { 15 return arguments; 16 }(1, 2, 3)); 17 18 Object.defineProperty(arg, "genericProperty", { 19 configurable: false 20 }); 21 22 try { 23 Object.defineProperties(arg, { 24 "genericProperty": { 25 configurable: true 26 } 27 }); 28 29 throw new Test262Error("Expected an exception."); 30 } catch (e) { 31 if (!(e instanceof TypeError)) { 32 throw new Test262Error("Expected TypeError, got " + e); 33 } 34 } 35 36 verifyProperty(arg, "genericProperty", { 37 value: undefined, 38 writable: false, 39 enumerable: false, 40 configurable: false, 41 }); 42 43 reportCompare(0, 0);