tor-browser

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

15.2.3.6-4-438.js (921B)


      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-438
      6 description: >
      7    ES5 Attributes - fail to update [[Configurable]] attribute of
      8    accessor property ([[Get]] is undefined, [[Set]] is undefined,
      9    [[Enumerable]] is true, [[Configurable]] is false) to different
     10    value
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 var obj = {};
     15 
     16 Object.defineProperty(obj, "prop", {
     17  get: undefined,
     18  set: undefined,
     19  enumerable: true,
     20  configurable: false
     21 });
     22 var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
     23 
     24 try {
     25  Object.defineProperty(obj, "prop", {
     26    configurable: true
     27  });
     28 
     29  throw new Test262Error("Expected TypeError");
     30 } catch (e) {
     31  assert(e instanceof TypeError);
     32 
     33  assert.sameValue(desc1.configurable, false);
     34 }
     35 
     36 verifyProperty(obj, "prop", {
     37  configurable: false,
     38 });
     39 
     40 reportCompare(0, 0);