tor-browser

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

15.2.3.6-4-75.js (767B)


      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-75
      6 description: >
      7    Object.defineProperty - both desc.[[Get]] and name.[[Get]] are two
      8    objects which refer to the same object (8.12.9 step 6)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 
     13 var obj = {};
     14 
     15 function getFunc() {
     16  return 10;
     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  get: getFunc
     30 });
     31 verifyEqualTo(obj, "foo", getFunc());
     32 
     33 verifyWritable(obj, "foo", "helpVerifySet");
     34 
     35 verifyProperty(obj, "foo", {
     36  enumerable: false,
     37  configurable: false,
     38 });
     39 
     40 reportCompare(0, 0);