tor-browser

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

S12.6.4_A2.js (896B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: "\"for(key in null)\" Expression is allowed"
      6 es5id: 12.6.4_A2
      7 description: Checking if execution of "for(key in null)" passes
      8 ---*/
      9 
     10 //////////////////////////////////////////////////////////////////////////////
     11 //CHECK#
     12 try {
     13 for(__key in null){
     14     var key=__key;
     15 };
     16 } catch (e) {
     17 throw new Test262Error('#1: "for(__key in null){}" does not lead to throwing exception');
     18 }
     19 //
     20 //////////////////////////////////////////////////////////////////////////////
     21 
     22 //////////////////////////////////////////////////////////////////////////////
     23 //CHECK#2
     24 if (key!==undefined) {
     25 throw new Test262Error('#2: key === undefined. Actual: key ==='+key);
     26 }
     27 //
     28 //////////////////////////////////////////////////////////////////////////////
     29 
     30 reportCompare(0, 0);