15.2.3.6-4-404.js (749B)
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-404 6 description: > 7 ES5 Attributes - Inherited property whose [[Enumerable]] attribute 8 is set to true is enumerable (Boolean instance) 9 ---*/ 10 11 Object.defineProperty(Boolean.prototype, "prop", { 12 value: 1001, 13 writable: true, 14 enumerable: true, 15 configurable: true 16 }); 17 var boolObj = new Boolean(); 18 19 var verifyEnumerable = false; 20 for (var p in boolObj) { 21 if (p === "prop") { 22 verifyEnumerable = true; 23 } 24 } 25 26 assert.sameValue(boolObj.hasOwnProperty("prop"), false, 'boolObj.hasOwnProperty("prop")'); 27 assert(verifyEnumerable, 'verifyEnumerable !== true'); 28 29 reportCompare(0, 0);