keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 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-407 |
| 6 | description: > |
| 7 | ES5 Attributes - [[Value]] attribute of inherited property of |
| 8 | [[Prototype]] internal property is correct (Error Instance) |
| 9 | ---*/ |
| 10 | |
| 11 | Object.defineProperty(Error.prototype, "prop", { |
| 12 | value: 1001, |
| 13 | writable: true, |
| 14 | enumerable: true, |
| 15 | configurable: true |
| 16 | }); |
| 17 | var errObj = new Error(); |
| 18 | |
| 19 | assert.sameValue(errObj.hasOwnProperty("prop"), false, 'errObj.hasOwnProperty("prop")'); |
| 20 | assert.sameValue(errObj.prop, 1001, 'errObj.prop'); |