toolkit/content/tests/chrome/test_bug451286.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial