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-257.js (866B)


      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-257
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is an array index
      8    named property that already exists on 'O' is accessor property and
      9    'desc' is accessor descriptor, test updating the [[Set]] attribute
     10    value of 'P' with different getter function (15.4.5.1 step 4.c)
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 
     15 var arr = [];
     16 
     17 function set_fun(value) {
     18  arr.setVerifyHelpProp = value;
     19 }
     20 
     21 Object.defineProperty(arr, "0", {
     22  set: function() {},
     23  configurable: true
     24 });
     25 
     26 Object.defineProperties(arr, {
     27  "0": {
     28    set: set_fun
     29  }
     30 });
     31 verifyWritable(arr, "0", "setVerifyHelpProp");
     32 
     33 verifyProperty(arr, "0", {
     34  enumerable: false,
     35  configurable: true,
     36 });
     37 
     38 reportCompare(0, 0);