tor-browser

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

regress-82306.js (1358B)


      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 * Date: 23 May 2001
      8 *
      9 * SUMMARY: Regression test for Bugzilla bug 82306
     10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=82306
     11 *
     12 * This test used to crash the JS engine. This was discovered
     13 * by Mike Epstein <epstein@tellme.com>
     14 */
     15 //-----------------------------------------------------------------------------
     16 var BUGNUMBER = 82306;
     17 var summary = "Testing we don't crash on encodeURI()";
     18 var URI = '';
     19 
     20 
     21 //-----------------------------------------------------------------------------
     22 test();
     23 //-----------------------------------------------------------------------------
     24 
     25 
     26 function test()
     27 {
     28  printBugNumber(BUGNUMBER);
     29  printStatus (summary);
     30 
     31  URI += '<?xml version="1.0"?>';
     32  URI += '<zcti application="xxxx_demo">';
     33  URI += '<pstn_data>';
     34  URI += '<ani>650-930-xxxx</ani>';
     35  URI += '<dnis>877-485-xxxx</dnis>';
     36  URI += '</pstn_data>';
     37  URI += '<keyvalue key="name" value="xxx"/>';
     38  URI += '<keyvalue key="phone" value="6509309000"/>';
     39  URI += '</zcti>';
     40 
     41  // Just testing that we don't crash on this
     42  encodeURI(URI);
     43 
     44  reportCompare('No Crash', 'No Crash', '');
     45 }