Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: dom/tests/mochitest/chrome/chrome.toml
<?xml version="1.0"?>
<!--
-->
<!-- test results are displayed in the html:body -->
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
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>