15.2.3.6-4-72.js (704B)
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-72 6 description: > 7 Object.defineProperty - desc.value and name.value are two Ojbects 8 which refer to the different objects (8.12.9 step 6) 9 includes: [propertyHelper.js] 10 ---*/ 11 12 13 var obj = {}; 14 15 var obj1 = { 16 length: 10 17 }; 18 obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true 19 20 var obj2 = { 21 length: 20 22 }; 23 24 Object.defineProperty(obj, "foo", { 25 value: obj2 26 }); 27 28 verifyProperty(obj, "foo", { 29 value: obj2, 30 writable: true, 31 enumerable: true, 32 configurable: true, 33 }); 34 35 reportCompare(0, 0);