tor-browser

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

15.2.3.6-4-113.js (734B)


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