|
1 // |reftest| skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild) slow |
|
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 //----------------------------------------------------------------------------- |
|
8 var BUGNUMBER = 314401; |
|
9 var summary = 'setTimeout(eval,0,"",null)|setTimeout(Script,0,"",null) should not crash'; |
|
10 var actual = 'No Crash'; |
|
11 var expect = 'No Crash'; |
|
12 |
|
13 printBugNumber(BUGNUMBER); |
|
14 printStatus (summary); |
|
15 |
|
16 if (typeof setTimeout == 'undefined') |
|
17 { |
|
18 reportCompare(expect, actual, 'Test Skipped.'); |
|
19 } |
|
20 else |
|
21 { |
|
22 gDelayTestDriverEnd = true; |
|
23 window.onerror = null; |
|
24 |
|
25 try |
|
26 { |
|
27 setTimeout(eval, 0, '', null); |
|
28 } |
|
29 catch(ex) |
|
30 { |
|
31 printStatus(ex+''); |
|
32 } |
|
33 |
|
34 reportCompare(expect, actual, 'setTimeout(eval, 0, "", null)'); |
|
35 |
|
36 if (typeof Script != 'undefined') |
|
37 { |
|
38 try |
|
39 { |
|
40 setTimeout(Script, 0, '', null); |
|
41 } |
|
42 catch(ex) |
|
43 { |
|
44 printStatus(ex+''); |
|
45 } |
|
46 reportCompare(expect, actual, 'setTimeout(Script, 0, "", null)'); |
|
47 } |
|
48 |
|
49 try |
|
50 { |
|
51 setInterval(eval, 0, '', null); |
|
52 } |
|
53 catch(ex) |
|
54 { |
|
55 printStatus(ex+''); |
|
56 } |
|
57 reportCompare(expect, actual, 'setInterval(eval, 0, "", null)'); |
|
58 |
|
59 if (typeof Script != 'undefined') |
|
60 { |
|
61 try |
|
62 { |
|
63 setInterval(Script, 0, '', null); |
|
64 } |
|
65 catch(ex) |
|
66 { |
|
67 printStatus(ex+''); |
|
68 } |
|
69 reportCompare(expect, actual, 'setInterval(Script, 0, "", null)'); |
|
70 } |
|
71 setTimeout('gDelayTestDriverEnd = false; jsTestDriverEnd();', 0); |
|
72 } |