tor-browser

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

15.2.3.7-6-a-11.js (730B)


      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-6-a-11
      6 description: >
      7    Object.defineProperties - 'P' is inherited accessor property
      8    without a get function (8.12.9 step 1 )
      9 ---*/
     10 
     11 var proto = {};
     12 Object.defineProperty(proto, "prop", {
     13  set: function() {},
     14  configurable: false
     15 });
     16 var Con = function() {};
     17 Con.prototype = proto;
     18 
     19 var obj = new Con();
     20 
     21 Object.defineProperties(obj, {
     22  prop: {
     23    get: function() {
     24      return 12;
     25    },
     26    configurable: true
     27  }
     28 });
     29 
     30 assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
     31 assert.sameValue(obj.prop, 12, 'obj.prop');
     32 
     33 reportCompare(0, 0);