15.2.3.6-4-32.js (719B)
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-32 6 description: > 7 Object.defineProperty - 'name' is an inherited accessor property 8 without a get function (8.12.9 step 1) 9 ---*/ 10 11 var proto = {}; 12 Object.defineProperty(proto, "foo", { 13 set: function() {}, 14 configurable: false 15 }); 16 17 var ConstructFun = function() {}; 18 ConstructFun.prototype = proto; 19 var obj = new ConstructFun(); 20 21 Object.defineProperty(obj, "foo", { 22 configurable: true 23 }); 24 25 assert(obj.hasOwnProperty("foo"), 'obj.hasOwnProperty("foo") !== true'); 26 assert.sameValue(typeof obj.foo, "undefined", 'typeof obj.foo'); 27 28 reportCompare(0, 0);