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-279.js (1035B)


      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-279
      6 description: >
      7    Object.defineProperties - 'O' is an Arguments object, 'P' is own
      8    property which is ever defined in both [[ParameterMap]] of 'O' and
      9    'O', and is deleted afterwards, and 'desc' is accessor descriptor,
     10    test 'P' is redefined in 'O' with all correct attribute values
     11    (10.6 [[DefineOwnProperty]] step 3)
     12 includes: [propertyHelper.js]
     13 ---*/
     14 
     15 
     16 var arg;
     17 
     18 (function fun(a, b, c) {
     19  arg = arguments;
     20 }(0, 1, 2));
     21 
     22 delete arg[0];
     23 
     24 function get_func() {
     25  return 10;
     26 }
     27 
     28 function set_func(value) {
     29  arg.setVerifyHelpProp = value;
     30 }
     31 
     32 Object.defineProperties(arg, {
     33  "0": {
     34    get: get_func,
     35    set: set_func,
     36    enumerable: true,
     37    configurable: true
     38  }
     39 });
     40 
     41 verifyEqualTo(arg, "0", get_func());
     42 
     43 verifyWritable(arg, "0", "setVerifyHelpProp");
     44 
     45 verifyProperty(arg, "0", {
     46  enumerable: true,
     47  configurable: true,
     48 });
     49 
     50 reportCompare(0, 0);