tor-browser

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

S15.2.3.4_A1_T1.js (715B)


      1 // Copyright 2011 Google, Inc.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    Object.getOwnProperties and Object.prototype.hasOwnProperty should
      7    agree on what the own properties are.
      8 es5id: 15.2.3.4_A1_T1
      9 description: >
     10    Check that all the own property names reported by
     11    Object.getOwnPropertyNames on a strict function are names that
     12    hasOwnProperty agrees are own properties.
     13 ---*/
     14 
     15 function foo() {}
     16 
     17 var names = Object.getOwnPropertyNames(foo);
     18 for (var i = 0, len = names.length; i < len; i++) {
     19  assert(!!foo.hasOwnProperty(names[i]), 'The value of !!foo.hasOwnProperty(names[i]) is expected to be true');
     20 }
     21 
     22 reportCompare(0, 0);