tor-browser

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

15.2.3.6-4-582.js (742B)


      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-582
      6 description: >
      7    ES5 Attributes - Inherited property is non-enumerable (Function
      8    instance)
      9 ---*/
     10 
     11 var data = "data";
     12 
     13 Object.defineProperty(Function.prototype, "prop", {
     14  get: function() {
     15    return data;
     16  },
     17  enumerable: false,
     18  configurable: true
     19 });
     20 var funObj = function() {};
     21 var verifyEnumerable = false;
     22 for (var p in funObj) {
     23  if (p === "prop") {
     24    verifyEnumerable = true;
     25  }
     26 }
     27 
     28 assert.sameValue(funObj.hasOwnProperty("prop"), false, 'funObj.hasOwnProperty("prop")');
     29 assert.sameValue(verifyEnumerable, false, 'verifyEnumerable');
     30 
     31 reportCompare(0, 0);