tor-browser

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

15.2.3.14-2-7.js (624B)


      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.14-2-7
      6 description: >
      7    Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable
      8    data or accessor properties
      9 ---*/
     10 
     11 var obj = {};
     12 
     13 Object.defineProperty(obj, "prop1", {
     14  value: 1001,
     15  enumerable: false,
     16  configurable: true
     17 });
     18 
     19 Object.defineProperty(obj, "prop2", {
     20  get: function() {
     21    return 1002;
     22  },
     23  enumerable: false,
     24  configurable: true
     25 });
     26 
     27 var arr = Object.keys(obj);
     28 
     29 assert.sameValue(arr.length, 0, 'arr.length');
     30 
     31 reportCompare(0, 0);