15.2.3.6-4-595.js (797B)
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-595 6 description: > 7 ES5 Attributes - Inherited property is 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 set: function(value) { 19 data = value; 20 }, 21 enumerable: true, 22 configurable: true 23 }); 24 25 var obj = foo.bind({}); 26 27 var verifyEnumerable = false; 28 for (var p in obj) { 29 if (p === "prop") { 30 verifyEnumerable = true; 31 } 32 } 33 34 assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")'); 35 assert(verifyEnumerable, 'verifyEnumerable !== true'); 36 37 reportCompare(0, 0);