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-269.js (896B)


      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-269
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is generic own data
      8    property of 'O', and 'desc' is data descriptor, test updating
      9    multiple attribute values of 'P' (15.4.5.1 step 5)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var arr = [];
     15 arr.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true
     16 
     17 Object.defineProperties(arr, {
     18  "property": {
     19    writable: false,
     20    enumerable: false,
     21    configurable: false
     22  }
     23 });
     24 
     25 verifyProperty(arr, "property", {
     26  value: 12,
     27  writable: false,
     28  enumerable: false,
     29  configurable: false,
     30 });
     31 
     32 if (arr.length !== 0) {
     33  throw new Test262Error('Expected arr.length === 0, actually ' + arr.length);
     34 }
     35 
     36 reportCompare(0, 0);