tor-browser

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

15.2.3.6-4-57.js (947B)


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