summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js
blob: 10826fd4d02c7da954e4276823e5baa74e6d1e36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    Let 'x' be the return value from getPrototypeOf when called on d.
    Then, x.isPrototypeOf(d) must be true.
es5id: 15.2.3.2-2-2
description: >
    Object.getPrototypeOf returns the [[Prototype]] of its parameter
    (custom object)
---*/

function base() {}

function derived() {}
derived.prototype = new base();

var d = new derived();
var x = Object.getPrototypeOf(d);

assert.sameValue(x.isPrototypeOf(d), true, 'x.isPrototypeOf(d)');

reportCompare(0, 0);