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 *
8 * Date: 03 February 2003
9 * SUMMARY: Testing script with huge number of comments
10 *
11 * See http://bugzilla.mozilla.org/show_bug.cgi?id=191633
12 *
13 */
14 //-----------------------------------------------------------------------------
15 var UBound = 0;
16 var BUGNUMBER = 191633;
17 var summary = 'Testing script with huge number of comments';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
26 status = inSection(1);
27 actual = false; // initialize to failure
28 var s = repeat_str("//\n", 40000); // Build a string of 40000 lines of comments
29 eval(s + "actual = true;");
30 expect = true;
31 addThis();
35 //-----------------------------------------------------------------------------
36 test();
37 //-----------------------------------------------------------------------------
41 function repeat_str(str, repeat_count)
42 {
43 var arr = new Array(repeat_count);
45 while (repeat_count != 0)
46 arr[--repeat_count] = str;
48 return str.concat.apply(str, arr);
49 }
52 function addThis()
53 {
54 statusitems[UBound] = status;
55 actualvalues[UBound] = actual;
56 expectedvalues[UBound] = expect;
57 UBound++;
58 }
61 function test()
62 {
63 enterFunc('test');
64 printBugNumber(BUGNUMBER);
65 printStatus(summary);
67 for (var i=0; i<UBound; i++)
68 {
69 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
70 }
72 exitFunc ('test');
73 }