tor-browser

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

8.14.4-8-b_1.js (549B)


      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: 8.14.4-8-b_1
      6 description: Non-writable property on a prototype written to.
      7 flags: [noStrict]
      8 ---*/
      9 
     10    function foo() {};
     11    Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); 
     12    
     13    var o = new foo(); 
     14    o.bar = "overridden"; 
     15 
     16 assert.sameValue(o.hasOwnProperty("bar"), false, 'o.hasOwnProperty("bar")');
     17 assert.sameValue(o.bar, "unwritable", 'o.bar');
     18 
     19 reportCompare(0, 0);