tor-browser

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

15.2.3.14-4-1.js (678B)


      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-4-1
      6 description: Object.keys - elements of the returned array start from index 0
      7 ---*/
      8 
      9 var obj = {
     10  prop1: 1001,
     11  prop2: 1002
     12 };
     13 
     14 Object.defineProperty(obj, "prop3", {
     15  value: 1003,
     16  enumerable: true,
     17  configurable: true
     18 });
     19 
     20 Object.defineProperty(obj, "prop4", {
     21  get: function() {
     22    return 1003;
     23  },
     24  enumerable: true,
     25  configurable: true
     26 });
     27 
     28 var arr = Object.keys(obj);
     29 
     30 assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
     31 assert.sameValue(arr[0], "prop1", 'arr[0]');
     32 
     33 reportCompare(0, 0);