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-108.js (831B)


      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-108
      6 description: >
      7    Object.defineProperties - 'P' is accessor property, P.configurable
      8    is true and properties.configurable is false
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 
     13 var obj = {};
     14 
     15 function get_func() {
     16  return 10;
     17 }
     18 
     19 function set_func(value) {
     20  obj.setVerifyHelpProp = value;
     21 }
     22 
     23 Object.defineProperty(obj, "foo", {
     24  get: get_func,
     25  set: set_func,
     26  enumerable: true,
     27  configurable: true
     28 });
     29 
     30 Object.defineProperties(obj, {
     31  foo: {
     32    configurable: false
     33  }
     34 });
     35 verifyEqualTo(obj, "foo", get_func());
     36 
     37 verifyWritable(obj, "foo", "setVerifyHelpProp");
     38 
     39 verifyProperty(obj, "foo", {
     40  enumerable: true,
     41  configurable: false,
     42 });
     43 
     44 reportCompare(0, 0);