tor-browser

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

15.2.3.6-4-197.js (726B)


      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-197
      6 description: >
      7    Object.defineProperty - 'O' is an Array, 'name' is an array index
      8    named property, 'name' is own accessor property that overrides an
      9    inherited accessor property (15.4.5.1 step 4.c)
     10 ---*/
     11 
     12 
     13 assert.throws(TypeError, function() {
     14  Object.defineProperty(Array.prototype, "0", {
     15    get: function() {},
     16    configurable: true
     17  });
     18 
     19  var arrObj = [];
     20  Object.defineProperty(arrObj, "0", {
     21    get: function() {},
     22    configurable: false
     23  });
     24 
     25  Object.defineProperty(arrObj, "0", {
     26    configurable: true
     27  });
     28 });
     29 
     30 reportCompare(0, 0);