Wed, 31 Dec 2014 06:09:35 +0100
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 var BUGNUMBER = 375711;
8 var summary = 'Do not assert with /[Q-b]/i.exec("")';
9 var actual = '';
10 var expect = '';
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
17 function test()
18 {
19 enterFunc ('test');
20 printBugNumber(BUGNUMBER);
21 printStatus (summary);
23 var s;
25 // see bug 416933
26 print('see bug 416933 for changed behavior on Gecko 1.9');
28 try
29 {
30 s = '/[Q-b]/.exec("")';
31 expect = 'No Error';
32 print(s + ' expect ' + expect);
33 eval(s);
34 actual = 'No Error';
35 }
36 catch(ex)
37 {
38 actual = ex + '';
39 }
40 reportCompare(expect, actual, summary + ': ' + s);
42 try
43 {
44 s ='/[Q-b]/i.exec("")';
45 expect = 'No Error';
46 print(s + ' expect ' + expect);
47 eval(s);
48 actual = 'No Error';
49 }
50 catch(ex)
51 {
52 actual = ex + '';
53 }
54 reportCompare(expect, actual, summary + ': ' + s);
56 try
57 {
58 s = '/[q-b]/.exec("")';
59 expect = 'SyntaxError: invalid range in character class';
60 print(s + ' expect ' + expect);
61 eval(s);
62 actual = 'No Error';
63 }
64 catch(ex)
65 {
66 actual = ex + '';
67 }
68 reportCompare(expect, actual, summary + ': ' + s);
70 try
71 {
72 s ='/[q-b]/i.exec("")';
73 expect = 'SyntaxError: invalid range in character class';
74 print(s + ' expect ' + expect);
75 eval(s);
76 actual = 'No Error';
77 }
78 catch(ex)
79 {
80 actual = ex + '';
81 }
82 reportCompare(expect, actual, summary + ': ' + s);
84 exitFunc ('test');
85 }