| 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.4-4-37 |
| 6 |
description: > |
| 7 |
Object.getOwnPropertyNames - inherited accessor properties are not |
| 8 |
pushed into the returned array |
| 9 |
---*/ |
| 10 |
|
| 11 |
var proto = {}; |
| 12 |
Object.defineProperty(proto, "parent", { |
| 13 |
get: function() { |
| 14 |
return "parent"; |
| 15 |
}, |
| 16 |
configurable: true |
| 17 |
}); |
| 18 |
|
| 19 |
var Con = function() {}; |
| 20 |
Con.prototype = proto; |
| 21 |
|
| 22 |
var child = new Con(); |
| 23 |
|
| 24 |
var result = Object.getOwnPropertyNames(child); |
| 25 |
|
| 26 |
for (var p in result) { |
| 27 |
assert.notSameValue(result[p], "parent", 'result[p]'); |
| 28 |
} |