Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<?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 662519"
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 662519</a>
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 662519 **/
let w = null;
let steps = [
function() {
w = window.open("file_popup_blocker_chrome.html", "", "width=200,height=200");
ok(w, "The window object shouldn't be null");
// next() is called within file_popup_blocker_chrome.html
},
function() {
w.close();
ok(true, "The popup appeared");
next();
},
function() {
w = window.open("file_popup_blocker_chrome.html", "_blank", "width=200,height=200");
ok(w, "The window object shouldn't be null");
// next() is called within file_popup_blocker_chrome.html
},
function() {
w.close();
ok(true, "The popup appeared");
next();
},
];
function next() {
if (!steps.length) {
SimpleTest.finish();
return;
}
let step = steps.shift();
step();
}
SimpleTest.waitForExplicitFinish();
// We have to enable dom.disable_open_during_load which is disabled
// by the test harness.
SpecialPowers.pushPrefEnv({'set': [["dom.disable_open_during_load", true]] }, function() {
next();
});
]]>
</script>
</window>