| 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-421 |
| 6 |
description: > |
| 7 |
ES5 Attributes - Inherited property whose [[Enumerable]] attribute |
| 8 |
is set to false is non-enumerable (Function.prototype.bind) |
| 9 |
---*/ |
| 10 |
|
| 11 |
var foo = function() {}; |
| 12 |
|
| 13 |
Object.defineProperty(Function.prototype, "prop", { |
| 14 |
value: 1001, |
| 15 |
writable: false, |
| 16 |
enumerable: false, |
| 17 |
configurable: true |
| 18 |
}); |
| 19 |
|
| 20 |
var obj = foo.bind({}); |
| 21 |
var verifyEnumerable = false; |
| 22 |
for (var p in obj) { |
| 23 |
if (p === "prop") { |
| 24 |
verifyEnumerable = true; |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")'); |
| 29 |
assert.sameValue(verifyEnumerable, false, 'verifyEnumerable'); |