tor-browser

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

15.2.3.7-6-a-203.js (761B)


      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.7-6-a-203
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is an array index
      8    named property, 'P' property doesn't exist in 'O', test
      9    [[Enumerable]] of 'P' property in 'Attributes' is set as false
     10    value if [[Enumerable]] is absent in accessor descriptor 'desc'
     11    (15.4.5.1 step 4.c)
     12 ---*/
     13 
     14 var arr = [];
     15 
     16 Object.defineProperties(arr, {
     17  "0": {
     18    set: function() {},
     19    get: function() {},
     20    configurable: true
     21  }
     22 });
     23 
     24 for (var i in arr) {
     25  assert.sameValue(i === "0" && arr.hasOwnProperty("0"), false, 'i === "0" && arr.hasOwnProperty("0")');
     26 }
     27 
     28 reportCompare(0, 0);