| 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.3-3-3 |
| 6 |
description: > |
| 7 |
Object.getOwnPropertyDescriptor - 'P' is own data property that |
| 8 |
overrides an inherited data property |
| 9 |
---*/ |
| 10 |
|
| 11 |
var proto = { |
| 12 |
property: "inheritedDataProperty" |
| 13 |
}; |
| 14 |
|
| 15 |
var Con = function() {}; |
| 16 |
Con.ptototype = proto; |
| 17 |
|
| 18 |
var child = new Con(); |
| 19 |
child.property = "ownDataProperty"; |
| 20 |
|
| 21 |
var desc = Object.getOwnPropertyDescriptor(child, "property"); |
| 22 |
|
| 23 |
assert.sameValue(desc.value, "ownDataProperty", 'desc.value'); |