tor-browser

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

15.2.3.9-2-b-i-2.js (868B)


      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.9-2-b-i-2
      6 description: >
      7    Object.freeze - The [[Wrtiable]] attribute of all own data
      8    property of 'O' is set to false while other attributes are
      9    unchanged
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var obj = {};
     14 
     15 Object.defineProperty(obj, "foo1", {
     16  value: 10,
     17  writable: false,
     18  enumerable: true,
     19  configurable: false
     20 });
     21 
     22 Object.defineProperty(obj, "foo2", {
     23  value: 20,
     24  writable: true,
     25  enumerable: false,
     26  configurable: false
     27 });
     28 
     29 Object.freeze(obj);
     30 
     31 verifyProperty(obj, "foo1", {
     32  value: 10,
     33  writable: false,
     34  enumerable: true,
     35  configurable: false,
     36 });
     37 
     38 verifyProperty(obj, "foo2", {
     39  value: 20,
     40  writable: false,
     41  enumerable: false,
     42  configurable: false,
     43 });
     44 
     45 reportCompare(0, 0);