tor-browser

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

15.2.3.12-2-2.js (656B)


      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.12-2-2
      6 description: >
      7    Object.isFrozen - inherited accessor property is not considered
      8    into the for each loop
      9 ---*/
     10 
     11 var proto = {};
     12 
     13 function get_func() {
     14  return 10;
     15 }
     16 
     17 function set_func() {}
     18 
     19 Object.defineProperty(proto, "Father", {
     20  get: get_func,
     21  set: set_func,
     22  configurable: true
     23 });
     24 
     25 var Con = function() {};
     26 Con.prototype = proto;
     27 
     28 var child = new Con();
     29 
     30 Object.preventExtensions(child);
     31 
     32 assert(Object.isFrozen(child), 'Object.isFrozen(child) !== true');
     33 
     34 reportCompare(0, 0);