Source code

Revision control

Copy as Markdown

Other Tools

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<!--
-->
<window title="Mozilla Bug 1224790"
<!-- test results are displayed in the html:body -->
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 1224790 **/
function runTests() {
opener.wrappedJSObject.nonModalOpened()
}
function modalClosed(grandparent) {
// Request cycle collection to trigger destructor for parent modal window,
// that mutates mAncestorLink of this window.
var windowUtils = window.windowUtils;
Services.obs.notifyObservers(null, "child-cc-request");
windowUtils.cycleCollect();
// Wait for a while.
setTimeout(function() {
window.close();
grandparent.wrappedJSObject.nonModalClosed();
}, 3000);
}
SimpleTest.waitForFocus(runTests);
]]>
</script>
</window>