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-228.js (1034B)


      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-228
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is an array index
      8    property, TypeError is thrown if the [[Configurable]] attribute
      9    value of 'P' is false, and [[Enumerable]] of 'desc' is present and
     10    its value is different from the [[Enumerable]] attribute value of
     11    'P'  (15.4.5.1 step 4.c)
     12 includes: [propertyHelper.js]
     13 ---*/
     14 
     15 
     16 var arr = [];
     17 
     18 Object.defineProperty(arr, "1", {
     19  value: 3,
     20  configurable: false,
     21  enumerable: false
     22 
     23 });
     24 
     25 try {
     26  Object.defineProperties(arr, {
     27    "1": {
     28      value: 13,
     29      enumerable: true
     30    }
     31  });
     32  throw new Test262Error("Expected an exception.");
     33 } catch (e) {
     34  if (!(e instanceof TypeError)) {
     35    throw new Test262Error("Expected TypeError, got " + e);
     36  }
     37 }
     38 
     39 verifyProperty(arr, "1", {
     40  value: 3,
     41  writable: false,
     42  enumerable: false,
     43  configurable: false,
     44 });
     45 
     46 reportCompare(0, 0);