15.2.3.6-4-597.js (762B)
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-597 6 description: > 7 ES5 Attributes - Inherited property is non-enumerable 8 (Function.prototype.bind) 9 ---*/ 10 11 var foo = function() {}; 12 var data = "data"; 13 14 Object.defineProperty(Function.prototype, "prop", { 15 get: function() { 16 return data; 17 }, 18 enumerable: false, 19 configurable: true 20 }); 21 22 var obj = foo.bind({}); 23 24 var verifyEnumerable = false; 25 for (var p in obj) { 26 if (p === "prop") { 27 verifyEnumerable = true; 28 } 29 } 30 31 assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")'); 32 assert.sameValue(verifyEnumerable, false, 'verifyEnumerable'); 33 34 reportCompare(0, 0);