Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
- This test gets skipped with pattern: os == 'linux' && os_version == '24.04' && arch == 'x86_64' && debug && verify-standalone
- This test failed 5 times in the preceding 30 days. quicksearch this test
- Manifest: dom/base/test/mochitest.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
let gotUnload = false;
function runTest() {
win = window.open("file_bug1126851_post_unload.html", "");
// Reload replaces the inner window so we cannot wait for win.onunload
// and instead must rely on messages from the popup.
window.onmessage = function() {
if (gotUnload) {
SimpleTest.finish();
} else {
gotUnload = true;
ok(true, "got unload");
win.close();
}
}
// is also there in other browsers. But now we must ensure to get the right
// resize event to avoid races.
let evt;
win.onresize = function(e) {
if (e == evt) {
win.location.reload();
}
}
win.onload = function() {
evt = new win.Event("resize", { bubbles: true });
win.document.dispatchEvent(evt);
}
}
</script>
</head>
<body onload="runTest()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1126851">Mozilla Bug 1126851</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>