summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/object/gOPD-vs-prototype-accessor.js
blob: 472887f90bda5e95e951a7914971c488ec110925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

assertEq(function testcase() {
    var proto = {};
    Object.defineProperty(proto, "prop", {get: function () {return {};}, enumerable: true});
    var ConstructFun = function () {};
    ConstructFun.prototype = proto;
    var child = new ConstructFun;
    return Object.getOwnPropertyNames(child).indexOf('prop');
}(), -1);

reportCompare(0, 0, "ok");