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-12.js (867B)


      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-12
      6 description: >
      7    Object.defineProperties - 'O' is a Function object which
      8    implements its own [[GetOwnProperty]] method to get 'P' (8.12.9
      9    step 1 )
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var fun = function() {};
     14 
     15 Object.defineProperty(fun, "prop", {
     16  value: 11,
     17  configurable: false
     18 });
     19 
     20 try {
     21  Object.defineProperties(fun, {
     22    prop: {
     23      value: 12,
     24      configurable: true
     25    }
     26  });
     27  throw new Test262Error("Expected an exception.");
     28 } catch (e) {
     29  if (!(e instanceof TypeError)) {
     30    throw new Test262Error("Expected TypeError, got " + e);
     31  }
     32 }
     33 
     34 verifyProperty(fun, "prop", {
     35  value: 11,
     36  writable: false,
     37  enumerable: false,
     38  configurable: false,
     39 });
     40 
     41 reportCompare(0, 0);