object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js (800B)
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 esid: sec-setintegritylevel 6 description: > 7 Object.seal - the [[Configurable]] attribute of own data property 8 of 'O' is set from true to false and other attributes of the 9 property are unaltered 10 includes: [propertyHelper.js] 11 ---*/ 12 13 var obj = {}; 14 15 Object.defineProperty(obj, "foo", { 16 value: 10, 17 writable: true, 18 enumerable: true, 19 configurable: true 20 }); 21 var preCheck = Object.isExtensible(obj); 22 Object.seal(obj); 23 24 if (!preCheck) { 25 throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); 26 } 27 28 verifyProperty(obj, "foo", { 29 value: 10, 30 writable: true, 31 enumerable: true, 32 configurable: false, 33 }); 34 35 reportCompare(0, 0);