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

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:c26f0192730c
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/. */
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 enterFunc ('test');
29 printBugNumber(BUGNUMBER);
30 printStatus (summary);
31
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>';
41
42 // Just testing that we don't crash on this
43 encodeURI(URI);
44
45 reportCompare('No Crash', 'No Crash', '');
46
47 exitFunc ('test');
48 }

mercurial