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-292.js (997B)


      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-292
      6 description: >
      7    Object.defineProperties - 'O' is an Arguments object, 'P' is an
      8    array index named accessor property of 'O' but not defined in
      9    [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test
     10    updating multiple attribute values of 'P' (10.6
     11    [[DefineOwnProperty]] step 3)
     12 includes: [propertyHelper.js]
     13 ---*/
     14 
     15 
     16 var arg;
     17 
     18 (function fun() {
     19  arg = arguments;
     20 }(0, 1, 2));
     21 
     22 function get_func1() {
     23  return 10;
     24 }
     25 
     26 Object.defineProperty(arg, "0", {
     27  get: get_func1,
     28  enumerable: true,
     29  configurable: true
     30 });
     31 
     32 function get_func2() {
     33  return 20;
     34 }
     35 
     36 Object.defineProperties(arg, {
     37  "0": {
     38    get: get_func2,
     39    enumerable: false,
     40    configurable: false
     41  }
     42 });
     43 
     44 verifyEqualTo(arg, "0", get_func2());
     45 
     46 verifyProperty(arg, "0", {
     47  enumerable: false,
     48  configurable: false,
     49 });
     50 
     51 reportCompare(0, 0);