gecko/layout/base/tests/chrome/test_printpreview_bug482976.xul

44 lines
1.5 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=482976
-->
<window title="Mozilla Bug 482976"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=482976"
target="_blank">Mozilla Bug 482976</a>
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
if (navigator.platform.startsWith("Linux")) {
SimpleTest.expectAssertions(1); // bug 671976
} else if (navigator.platform.startsWith("Win")) {
SimpleTest.expectAssertions(0, 2); // bug 671976
}
SimpleTest.waitForExplicitFinish();
function parentFinish() {
// This is called while the helper window is still open. Call
// doGC after it closes.
setTimeout(doGC, 0);
}
function doGC() {
// Garbage collecting the windows created in this test can cause
// assertions, so GC now to blame those assertions to this test.
// ("Destroying a currently-showing document", bug 671976)
SpecialPowers.gc();
setTimeout(doFinish, 0);
}
function doFinish() {
SimpleTest.finish();
}
window.open("printpreview_bug482976_helper.xul", "bug482976", "chrome,width=100,height=100");
]]></script>
</window>