summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js')
-rw-r--r--js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js b/js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js
new file mode 100644
index 0000000000..40447c8eb6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/prototype/__lookupGetter__/lookup-own-acsr-w-getter.js
@@ -0,0 +1,26 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-additional-properties-of-the-object.prototype-object
+description: >
+ Behavior when "this" value defines a like-named accessor property with a
+ `get` method
+info: |
+ [...]
+ 4. Repeat
+ a. Let desc be ? O.[[GetOwnProperty]](key).
+ b. If desc is not undefined, then
+ i. If IsAccessorDescriptor(desc) is true, return desc.[[Get]].
+ ii. Return undefined.
+ c. Let O be ? O.[[GetPrototypeOf]]().
+ d. If O is null, return undefined.
+features: [__getter__]
+---*/
+
+var root = Object.defineProperty({}, 'target', { get: function() {} });
+var desc = { get: function() {} };
+var subject = Object.create(root, { target: desc });
+
+assert.sameValue(subject.__lookupGetter__('target'), desc.get);
+
+reportCompare(0, 0);