tor-browser

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

15.2.3.7-5-b-147.js (801B)


      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.7-5-b-147
      6 description: >
      7    Object.defineProperties - 'writable' property of 'descObj' is own
      8    accessor property that overrides an inherited accessor property
      9    (8.10.5 step 6.a)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var obj = {};
     14 
     15 var proto = {};
     16 
     17 Object.defineProperty(proto, "writable", {
     18  get: function() {
     19    return true;
     20  }
     21 });
     22 
     23 var Con = function() {};
     24 Con.prototype = proto;
     25 
     26 var descObj = new Con();
     27 
     28 Object.defineProperty(descObj, "writable", {
     29  get: function() {
     30    return false;
     31  }
     32 });
     33 
     34 Object.defineProperties(obj, {
     35  property: descObj
     36 });
     37 
     38 verifyProperty(obj, "property", {
     39  writable: false,
     40 });
     41 
     42 reportCompare(0, 0);