tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

15.2.3.7-6-a-57.js (655B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      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 ---*/
     11 
     12 
     13 var obj = {};
     14 
     15 function get_Func() {
     16  return 10;
     17 }
     18 
     19 Object.defineProperty(obj, "foo", {
     20  get: get_Func
     21 });
     22 
     23 Object.defineProperties(obj, {
     24  foo: {
     25    get: get_Func
     26  }
     27 });
     28 
     29 assert.sameValue(obj.foo, 10);
     30 
     31 verifyProperty(obj, "foo", {
     32  enumerable: false,
     33  configurable: false,
     34 });
     35 
     36 reportCompare(0, 0);