tor-browser

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

15.2.3.6-4-116.js (674B)


      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-116
      6 description: >
      7    Object.defineProperty - 'O' is an Array, test the length property
      8    of 'O' is own data property (15.4.5.1 step 1)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 var arrObj = [0, 1];
     13 Object.defineProperty(arrObj, "1", {
     14  value: 1,
     15  configurable: false
     16 });
     17 
     18 assert.throws(TypeError, function() {
     19  Object.defineProperty(arrObj, "length", {
     20    value: 1
     21  });
     22 });
     23 
     24 verifyProperty(arrObj, "length", {
     25  value: 2,
     26  writable: true,
     27  configurable: false,
     28  enumerable: false,
     29 });
     30 
     31 reportCompare(0, 0);