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-37.js (787B)


      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-37
      6 description: >
      7    Object.defineProperties - 'desc' is accessor descriptor, test
      8    setting all attribute values of 'P' (8.12.9 step 4.b.i)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 var obj = {};
     13 var getFun = function() {
     14  return 10;
     15 };
     16 var setFun = function(value) {
     17  obj.setVerifyHelpProp = value;
     18 };
     19 
     20 Object.defineProperties(obj, {
     21  prop: {
     22    get: getFun,
     23    set: setFun,
     24    enumerable: false,
     25    configurable: false
     26  }
     27 });
     28 verifyEqualTo(obj, "prop", getFun());
     29 
     30 verifyWritable(obj, "prop", "setVerifyHelpProp");
     31 
     32 verifyProperty(obj, "prop", {
     33  enumerable: false,
     34  configurable: false,
     35 });
     36 
     37 reportCompare(0, 0);