tor-browser

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

15.2.3.6-4-406.js (762B)


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