summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js b/js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js
new file mode 100644
index 0000000000..10826fd4d0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/getPrototypeOf/15.2.3.2-2-2.js
@@ -0,0 +1,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);