tor-browser

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

regress-314401.js (1067B)


      1 // |reftest| skip-if(xulRuntime.shell||(winWidget&&isDebugBuild)) slow
      2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 //-----------------------------------------------------------------------------
      8 var BUGNUMBER = 314401;
      9 var summary = 'setTimeout(eval,0,"",null) should not crash';
     10 var actual = 'No Crash';
     11 var expect = 'No Crash';
     12 
     13 printBugNumber(BUGNUMBER);
     14 printStatus (summary);
     15 
     16 gDelayTestDriverEnd = true;
     17 window.onerror = null;
     18 
     19  try
     20  {
     21    setTimeout(eval, 0, '', null);
     22  }
     23  catch(ex)
     24  {
     25    printStatus(ex+'');
     26  }
     27 
     28  reportCompare(expect, actual, 'setTimeout(eval, 0, "", null)');
     29 
     30  try
     31  {
     32    setInterval(eval, 0, '', null);
     33  }
     34  catch(ex)
     35  {
     36    printStatus(ex+'');
     37  }
     38  reportCompare(expect, actual, 'setInterval(eval, 0, "", null)');
     39 
     40  setTimeout('gDelayTestDriverEnd = false; jsTestDriverEnd();', 0);