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-308.js (1043B)


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