tor-browser

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

15.2.3.6-4-59.js (735B)


      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-59
      6 description: >
      7    Object.defineProperty - 'name' is accessor descriptor and every
      8    fields in 'desc' is absent (8.12.9 step 5)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 
     13 var obj = {};
     14 
     15 function getFunc() {
     16  return 0;
     17 }
     18 
     19 function setFunc(value) {
     20  obj.helpVerifySet = value;
     21 }
     22 
     23 Object.defineProperty(obj, "foo", {
     24  get: getFunc,
     25  set: setFunc
     26 });
     27 
     28 Object.defineProperty(obj, "foo", {});
     29 verifyEqualTo(obj, "foo", getFunc());
     30 
     31 verifyWritable(obj, "foo", "helpVerifySet");
     32 
     33 verifyProperty(obj, "foo", {
     34  enumerable: false,
     35  configurable: false,
     36 });
     37 
     38 reportCompare(0, 0);