tor-browser

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

15.2.3.5-4-190.js (719B)


      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.5-4-190
      6 description: >
      7    Object.create - 'writable' property of one property in
      8    'Properties' is an inherited accessor property without a get
      9    function (8.10.5 step 6.a)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var proto = {
     14  value: 100
     15 };
     16 
     17 Object.defineProperty(proto, "writable", {
     18  set: function() {}
     19 });
     20 
     21 var ConstructFun = function() {};
     22 ConstructFun.prototype = proto;
     23 
     24 var descObj = new ConstructFun();
     25 
     26 var newObj = Object.create({}, {
     27  prop: descObj
     28 });
     29 
     30 verifyProperty(newObj, "prop", {
     31  value: 100,
     32  writable: false,
     33 });
     34 
     35 reportCompare(0, 0);