tor-browser

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

15.2.3.6-4-315-1.js (1351B)


      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-315-1
      6 description: >
      7    Object.defineProperty - 'O' is an Arguments object of a function
      8    that has formal parameters, 'P' is own accessor property of 'O',
      9    and 'desc' is accessor descriptor, test updating multiple
     10    attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 (function(a, b, c) {
     15  Object.defineProperty(arguments, "genericProperty", {
     16    get: function() {
     17      return 1001;
     18    },
     19    set: function(value) {
     20      this.testgetFunction1 = value;
     21    },
     22    enumerable: true,
     23    configurable: true
     24  });
     25 
     26  function getFunc() {
     27    return "getFunctionString";
     28  }
     29 
     30  function setFunc(value) {
     31    this.testgetFunction = value;
     32  }
     33  Object.defineProperty(arguments, "genericProperty", {
     34    get: getFunc,
     35    set: setFunc,
     36    enumerable: false,
     37    configurable: false
     38  });
     39  if (c !== 3) {
     40    throw new Test262Error('Expected c === 3, actually ' + c);
     41  }
     42 
     43  verifyEqualTo(arguments, "genericProperty", getFunc());
     44 
     45  verifyWritable(arguments, "genericProperty", "testgetFunction");
     46 
     47  verifyProperty(arguments, "genericProperty", {
     48    enumerable: false,
     49    configurable: false,
     50  });
     51 }(1, 2, 3));
     52 
     53 reportCompare(0, 0);