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-207.js (871B)


      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-207
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is an array index
      8    named property, 'P' makes no change if every field in 'desc' is
      9    absent (name is accessor property)  (15.4.5.1 step 4.c)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var arr = [];
     14 
     15 function get_func() {
     16  return 11;
     17 }
     18 
     19 function set_func(value) {
     20  arr.setVerifyHelpProp = value;
     21 }
     22 
     23 Object.defineProperty(arr, "0", {
     24  get: get_func,
     25  set: set_func,
     26  enumerable: true,
     27  configurable: true
     28 });
     29 
     30 Object.defineProperties(arr, {
     31  "0": {}
     32 });
     33 verifyEqualTo(arr, "0", get_func());
     34 
     35 verifyWritable(arr, "0", "setVerifyHelpProp");
     36 
     37 verifyProperty(arr, "0", {
     38  enumerable: true,
     39  configurable: true,
     40 });
     41 
     42 reportCompare(0, 0);