15.2.3.7-6-a-35.js (809B)
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-35 6 description: > 7 Object.defineProperties - 'P' doesn't exist in 'O', test 8 [[Enumerable]] of 'P' is set as false value if absent in accessor 9 descriptor 'desc' (8.12.9 step 4.b.i) 10 includes: [propertyHelper.js] 11 ---*/ 12 13 var obj = {}; 14 var getFun = function() { 15 return 10; 16 }; 17 var setFun = function(value) { 18 obj.setVerifyHelpProp = value; 19 }; 20 21 Object.defineProperties(obj, { 22 prop: { 23 set: setFun, 24 get: getFun, 25 configurable: true 26 } 27 }); 28 verifyEqualTo(obj, "prop", getFun()); 29 30 verifyWritable(obj, "prop", "setVerifyHelpProp"); 31 32 verifyProperty(obj, "prop", { 33 enumerable: false, 34 configurable: true, 35 }); 36 37 reportCompare(0, 0);