gecko/toolkit/content/tests/widgets/test_popuphidden.xul

43 lines
1.1 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<window title="Hidden Popup Test"
onload="setTimeout(runTests, 0);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<menupopup id="popup" hidden="true" onpopupshown="ok(true, 'popupshown'); this.hidePopup()"
onpopuphidden="SimpleTest.finish()">
<menuitem id="i1" label="One"/>
<menuitem id="i2" label="Two"/>
</menupopup>
<script class="testbody" type="application/javascript">
<![CDATA[
SimpleTest.waitForExplicitFinish();
function runTests()
{
var popup = $("popup");
popup.hidden = false;
popup.openPopup(null, "after_start");
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display">
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</window>