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-90.js (905B)


      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-90
      6 description: >
      7    Object.defineProperties will not throw TypeError when
      8    P.configurable is false, both properties.[[Get]] and P.[[Get]] are
      9    two objects which refer to the same object (8.12.9 step 11.a.ii)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var obj = {};
     15 
     16 function set_func(value) {
     17  obj.setVerifyHelpProp = value;
     18 }
     19 
     20 function get_func() {
     21  return 10;
     22 }
     23 
     24 Object.defineProperty(obj, "foo", {
     25  get: get_func,
     26  set: set_func,
     27  enumerable: false,
     28  configurable: false
     29 });
     30 
     31 Object.defineProperties(obj, {
     32  foo: {
     33    get: get_func
     34  }
     35 });
     36 verifyEqualTo(obj, "foo", get_func());
     37 
     38 verifyWritable(obj, "foo", "setVerifyHelpProp");
     39 
     40 verifyProperty(obj, "foo", {
     41  enumerable: false,
     42  configurable: false,
     43 });
     44 
     45 reportCompare(0, 0);