|
1 // |reftest| skip-if(!xulRuntime.shell) 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 = 407720; |
|
9 var summary = 'js_FindClassObject causes crashes with getter/setter - Browser only'; |
|
10 var actual = 'No Crash'; |
|
11 var expect = 'No Crash'; |
|
12 |
|
13 printBugNumber(BUGNUMBER); |
|
14 printStatus (summary); |
|
15 |
|
16 // stop the test after 60 seconds |
|
17 var start = new Date(); |
|
18 |
|
19 if (typeof document != 'undefined') |
|
20 { |
|
21 // delay test driver end |
|
22 gDelayTestDriverEnd = true; |
|
23 document.write('<iframe onload="onLoad()"><\/iframe>'); |
|
24 } |
|
25 else |
|
26 { |
|
27 actual = 'No Crash'; |
|
28 reportCompare(expect, actual, summary); |
|
29 } |
|
30 |
|
31 function onLoad() |
|
32 { |
|
33 |
|
34 if ( (new Date() - start) < 60*1000) |
|
35 { |
|
36 var x = frames[0].Window.prototype; |
|
37 x.a = x.b = x.c = 1; |
|
38 x.__defineGetter__("HTML document.all class", function() {}); |
|
39 frames[0].document.all; |
|
40 |
|
41 // retry |
|
42 frames[0].location = "about:blank"; |
|
43 } |
|
44 else |
|
45 { |
|
46 actual = 'No Crash'; |
|
47 |
|
48 reportCompare(expect, actual, summary); |
|
49 gDelayTestDriverEnd = false; |
|
50 jsTestDriverEnd(); |
|
51 } |
|
52 } |