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-268.js (963B)


      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-268
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is generic own
      8    accessor property of 'O', and 'desc' is accessor descriptor, test
      9    updating multiple attribute values of 'P' (15.4.5.1 step 5)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var arr = [];
     14 
     15 function get_fun() {
     16  return 12;
     17 }
     18 
     19 function set_fun(value) {
     20  arr.verifySetFun = value;
     21 }
     22 Object.defineProperty(arr, "property", {
     23  get: function() {
     24    return 36;
     25  },
     26  enumerable: true,
     27  configurable: true
     28 });
     29 
     30 Object.defineProperties(arr, {
     31  "property": {
     32    get: get_fun,
     33    set: set_fun,
     34    enumerable: false
     35  }
     36 });
     37 verifyEqualTo(arr, "property", get_fun());
     38 
     39 verifyWritable(arr, "property", "verifySetFun");
     40 
     41 verifyProperty(arr, "property", {
     42  enumerable: false,
     43  configurable: true,
     44 });
     45 
     46 reportCompare(0, 0);