|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet |
|
4 href="chrome://mochikit/content/tests/SimpleTest/test.css" |
|
5 type="text/css"?> |
|
6 <!-- |
|
7 https://bugzilla.mozilla.org/show_bug.cgi?id=451286 |
|
8 --> |
|
9 <window title="Mozilla Bug 451286" |
|
10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
11 |
|
12 <script type="application/javascript" |
|
13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
14 <script type="application/javascript" |
|
15 src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> |
|
16 |
|
17 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
18 <a target="_blank" |
|
19 href="https://bugzilla.mozilla.org/show_bug.cgi?id=451286"> |
|
20 Mozilla Bug 451286 |
|
21 </a> |
|
22 |
|
23 <p id="display"></p> |
|
24 <div id="content" style="display: none"> |
|
25 </div> |
|
26 <pre id="test"> |
|
27 </pre> |
|
28 </body> |
|
29 |
|
30 <script class="testbody" type="application/javascript"> |
|
31 <![CDATA[ |
|
32 |
|
33 // To be called by the window we open. |
|
34 function parentFinish() { |
|
35 // This is called with JS code from the window we open on the |
|
36 // stack. We need to GC everything in that window, so do that |
|
37 // from a timeout and then call SimpleTest.finish(). |
|
38 setTimeout(doFinish, 0); |
|
39 } |
|
40 |
|
41 function doFinish() { |
|
42 // Garbage collect objects created in this test can cause |
|
43 // assertions, so GC now to blame those assertions to this test. |
|
44 SpecialPowers.gc(); |
|
45 SimpleTest.finish(); |
|
46 } |
|
47 |
|
48 /** Test for Bug 451286 **/ |
|
49 SimpleTest.waitForExplicitFinish(); |
|
50 window.open("bug451286_window.xul", "451286test", |
|
51 "chrome,width=600,height=600"); |
|
52 |
|
53 ]]> |
|
54 </script> |
|
55 |
|
56 </window> |