tor-browser

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

15.2.3.6-4-320.js (1022B)


      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-320
      6 description: >
      7    Object.defineProperty - 'O' is an Arguments object, 'P' is own
      8    data property of 'O', test TypeError is thrown when updating the
      9    [[Configurable]] attribute value of 'P' which is not configurable
     10    (10.6 [[DefineOwnProperty]] step 4)
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 (function() {
     15  Object.defineProperty(arguments, "genericProperty", {
     16    configurable: false
     17  });
     18  try {
     19    Object.defineProperty(arguments, "genericProperty", {
     20      configurable: true
     21    });
     22    throw new Test262Error("Expected an exception.");
     23  } catch (e) {
     24    if (!(e instanceof TypeError)) {
     25      throw new Test262Error("Expected TypeError, got " + e);
     26    }
     27  }
     28 
     29  verifyProperty(arguments, "genericProperty", {
     30    value: undefined,
     31    writable: false,
     32    enumerable: false,
     33    configurable: false,
     34  });
     35 }(1, 2, 3));
     36 
     37 reportCompare(0, 0);