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

45 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=396024
-->
<window title="Mozilla Bug 369024"
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=396024"
target="_blank">Mozilla Bug 396024</a>
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
if (navigator.platform.startsWith("Linux")) {
SimpleTest.expectAssertions(2); // bug 671976
} else if (navigator.platform.startsWith("Win")) {
// reliable 2 on Win7, but not on XP
SimpleTest.expectAssertions(0, 2); // bug 671976
}
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();
}
SimpleTest.waitForExplicitFinish();
window.open("printpreview_bug396024_helper.xul", "bug396024", "chrome,width=100,height=100");
]]></script>
</window>