tor-browser

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

15.2.3.6-4-275.js (729B)


      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-275
      6 description: >
      7    Object.defineProperty - 'O' is an Array, 'name' is an array index
      8    named property, test the length property of 'O' is set as
      9    ToUint32('name') + 1 if ToUint32('name') equals to value of the
     10    length property in 'O' (15.4.5.1 step 4.e.ii)
     11 ---*/
     12 
     13 var arrObj = [];
     14 arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false
     15 
     16 Object.defineProperty(arrObj, "3", {
     17  value: 3
     18 });
     19 
     20 assert.sameValue(arrObj.length, 4, 'arrObj.length');
     21 assert.sameValue(arrObj[3], 3, 'arrObj[3]');
     22 
     23 reportCompare(0, 0);