tor-browser

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

15.2.3.6-4-417.js (657B)


      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.6-4-417
      6 description: >
      7    ES5 Attributes - [[Value]] attribute of inherited property of
      8    [[Prototype]] internal property is correct(Function.prototype.bind)
      9 ---*/
     10 
     11 var foo = function() {};
     12 
     13 Object.defineProperty(Function.prototype, "prop", {
     14  value: 1001,
     15  writable: true,
     16  enumerable: true,
     17  configurable: true
     18 });
     19 
     20 var obj = foo.bind({});
     21 
     22 assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")');
     23 assert.sameValue(obj.prop, 1001, 'obj.prop');
     24 
     25 reportCompare(0, 0);