tor-browser

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

regress-422592.js (1480B)


      1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 //-----------------------------------------------------------------------------
      7 var BUGNUMBER = 422592;
      8 var summary = 'js.c dis/dissrc should not kill script execution';
      9 var actual = '';
     10 var expect = '';
     11 
     12 
     13 //-----------------------------------------------------------------------------
     14 test();
     15 //-----------------------------------------------------------------------------
     16 
     17 function test()
     18 {
     19  printBugNumber(BUGNUMBER);
     20  printStatus (summary);
     21 
     22  if (typeof dis == 'undefined')
     23  {
     24    expect = actual = 'Test requires function dis. Not tested';
     25    print(expect);
     26  }
     27  else
     28  {
     29    expect = 'Completed';
     30    actual = 'Not Completed';
     31    print('Before dis');
     32    try
     33    {
     34      dis(print);
     35    }
     36    catch(ex)
     37    {
     38    }
     39    print('After dis');
     40    actual = 'Completed';
     41  }
     42  reportCompare(expect, actual, summary);
     43 
     44  if (typeof dissrc == 'undefined')
     45  {
     46    expect = actual = 'Test requires function dissrc. Not tested';
     47    print(expect);
     48  }
     49  else
     50  {
     51    print('Before dissrc');
     52    expect = 'Completed';
     53    actual = 'Not Completed';
     54    try
     55    {
     56      dissrc(print);
     57    }
     58    catch(ex)
     59    {
     60    }
     61    print('After dissrc');
     62    actual = 'Completed';
     63  }
     64  reportCompare(expect, actual, summary);
     65 }