15.2.3.7-5-b-149.js (803B)
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-5-b-149 6 description: > 7 Object.defineProperties - 'writable' property of 'descObj' is own 8 accessor property without a get function that overrides an 9 inherited accessor property (8.10.5 step 6.a) 10 includes: [propertyHelper.js] 11 ---*/ 12 13 var obj = {}; 14 15 var proto = {}; 16 17 Object.defineProperty(proto, "writable", { 18 get: function() { 19 return true; 20 } 21 }); 22 23 var Con = function() {}; 24 Con.prototype = proto; 25 26 var descObj = new Con(); 27 28 Object.defineProperty(descObj, "writable", { 29 set: function() {} 30 }); 31 32 Object.defineProperties(obj, { 33 property: descObj 34 }); 35 36 verifyProperty(obj, "property", { 37 writable: false, 38 }); 39 40 reportCompare(0, 0);