15.2.3.12-3-28.js (729B)
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.12-3-28 6 description: > 7 Object.isFrozen returns true when all own properties of 'O' are 8 not writable and not configurable, and 'O' is not extensible 9 ---*/ 10 11 var obj = {}; 12 13 Object.defineProperty(obj, "foo1", { 14 value: 20, 15 writable: false, 16 enumerable: false, 17 configurable: false 18 }); 19 20 21 function get_func() { 22 return 10; 23 } 24 25 function set_func() {} 26 27 Object.defineProperty(obj, "foo2", { 28 get: get_func, 29 set: set_func, 30 configurable: false 31 }); 32 33 Object.preventExtensions(obj); 34 35 assert(Object.isFrozen(obj), 'Object.isFrozen(obj) !== true'); 36 37 reportCompare(0, 0);