1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/tests/chrome/test_bug451286.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.6 +<?xml-stylesheet 1.7 + href="chrome://mochikit/content/tests/SimpleTest/test.css" 1.8 + type="text/css"?> 1.9 +<!-- 1.10 +https://bugzilla.mozilla.org/show_bug.cgi?id=451286 1.11 +--> 1.12 +<window title="Mozilla Bug 451286" 1.13 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.14 + 1.15 + <script type="application/javascript" 1.16 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.17 + <script type="application/javascript" 1.18 + src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> 1.19 + 1.20 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.21 + <a target="_blank" 1.22 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=451286"> 1.23 + Mozilla Bug 451286 1.24 + </a> 1.25 + 1.26 + <p id="display"></p> 1.27 + <div id="content" style="display: none"> 1.28 + </div> 1.29 + <pre id="test"> 1.30 + </pre> 1.31 + </body> 1.32 + 1.33 + <script class="testbody" type="application/javascript"> 1.34 + <![CDATA[ 1.35 + 1.36 + // To be called by the window we open. 1.37 + function parentFinish() { 1.38 + // This is called with JS code from the window we open on the 1.39 + // stack. We need to GC everything in that window, so do that 1.40 + // from a timeout and then call SimpleTest.finish(). 1.41 + setTimeout(doFinish, 0); 1.42 + } 1.43 + 1.44 + function doFinish() { 1.45 + // Garbage collect objects created in this test can cause 1.46 + // assertions, so GC now to blame those assertions to this test. 1.47 + SpecialPowers.gc(); 1.48 + SimpleTest.finish(); 1.49 + } 1.50 + 1.51 + /** Test for Bug 451286 **/ 1.52 + SimpleTest.waitForExplicitFinish(); 1.53 + window.open("bug451286_window.xul", "451286test", 1.54 + "chrome,width=600,height=600"); 1.55 + 1.56 + ]]> 1.57 + </script> 1.58 + 1.59 +</window>