15.2.3.6-4-22.js (547B)
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-22 6 description: > 7 Object.defineProperty - 'name' is existing own data property 8 (8.12.9 step 1) 9 ---*/ 10 11 var obj = {}; 12 Object.defineProperty(obj, "foo", { 13 value: 11, 14 configurable: false 15 }); 16 assert.throws(TypeError, function() { 17 Object.defineProperty(obj, "foo", { 18 value: 12, 19 configurable: true 20 }); 21 }); 22 assert.sameValue(obj.foo, 11, 'obj.foo'); 23 24 reportCompare(0, 0);