js/src/tests/js1_5/Regress/regress-82306.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
     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 = '';
    21 //-----------------------------------------------------------------------------
    22 test();
    23 //-----------------------------------------------------------------------------
    26 function test()
    27 {
    28   enterFunc ('test');
    29   printBugNumber(BUGNUMBER);
    30   printStatus (summary);
    32   URI += '<?xml version="1.0"?>';
    33   URI += '<zcti application="xxxx_demo">';
    34   URI += '<pstn_data>';
    35   URI += '<ani>650-930-xxxx</ani>';
    36   URI += '<dnis>877-485-xxxx</dnis>';
    37   URI += '</pstn_data>';
    38   URI += '<keyvalue key="name" value="xxx"/>';
    39   URI += '<keyvalue key="phone" value="6509309000"/>';
    40   URI += '</zcti>';
    42   // Just testing that we don't crash on this
    43   encodeURI(URI);
    45   reportCompare('No Crash', 'No Crash', '');
    47   exitFunc ('test');
    48 }

mercurial