tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

15.2.3.6-4-302-1.js (1163B)


      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.6-4-302-1
      6 description: >
      7    Object.defineProperty - 'O' is an Arguments object of a function
      8    that has formal parameters, 'name' is an index named property of
      9    'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is
     10    accessor descriptor, test 'name' is defined in 'O' with all
     11    correct attribute values (10.6 [[DefineOwnProperty]] step 3 and
     12    step 5a)
     13 includes: [propertyHelper.js]
     14 ---*/
     15 
     16 (function(a, b, c) {
     17  delete arguments[0];
     18 
     19  function getFunc() {
     20    return 10;
     21  }
     22 
     23  function setFunc(value) {
     24    this.setVerifyHelpProp = value;
     25  }
     26  Object.defineProperty(arguments, "0", {
     27    get: getFunc,
     28    set: setFunc,
     29    enumerable: false,
     30    configurable: false
     31  });
     32  if (a !== 0) {
     33    throw new Test262Error('Expected a === 0, actually ' + a);
     34  }
     35  verifyEqualTo(arguments, "0", getFunc());
     36 
     37  verifyWritable(arguments, "0", "setVerifyHelpProp");
     38 
     39  verifyProperty(arguments, "0", {
     40    enumerable: false,
     41    configurable: false,
     42  });
     43 }(0, 1, 2));
     44 
     45 reportCompare(0, 0);