tor-browser

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

object-seal-p-is-own-accessor-property.js (543B)


      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 esid: sec-setintegritylevel
      6 description: Object.seal - 'P' is own accessor property
      7 includes: [propertyHelper.js]
      8 ---*/
      9 
     10 var obj = {};
     11 
     12 Object.defineProperty(obj, "foo", {
     13  get: function() {
     14    return 10;
     15  },
     16  configurable: true
     17 });
     18 
     19 assert(Object.isExtensible(obj));
     20 Object.seal(obj);
     21 
     22 verifyProperty(obj, "foo", {
     23  configurable: false,
     24 });
     25 
     26 assert.sameValue(obj.foo, 10);
     27 
     28 reportCompare(0, 0);