Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperties / 15.2.3.7-6-a-57.js
blobf257a3fa8aef4f91b495be0280c37e04069c0417
1 // Copyright (c) 2012 Ecma International.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 es5id: 15.2.3.7-6-a-57
6 description: >
7     Object.defineProperties - both desc.[[Get]] and P.[[Get]] are two
8     objects which refer to the same object (8.12.9 step 6)
9 includes: [propertyHelper.js]
10 ---*/
13 var obj = {};
15 function get_Func() {
16   return 10;
19 Object.defineProperty(obj, "foo", {
20   get: get_Func
21 });
23 Object.defineProperties(obj, {
24   foo: {
25     get: get_Func
26   }
27 });
29 assert.sameValue(obj.foo, 10);
31 verifyProperty(obj, "foo", {
32   enumerable: false,
33   configurable: false,
34 });
36 reportCompare(0, 0);