mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1589102 - Part 12: Fix file_scrollRestoration.html to wait for about:blank to load before proceeding, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D87933
This commit is contained in:
parent
f90a2a6d1e
commit
52ff3841e4
@ -39,7 +39,7 @@
|
||||
opener.is(history.scrollRestoration, "manual", "Should have the same scrollRestoration as before reload.");
|
||||
document.getElementById("bottom").scrollIntoView();
|
||||
window.onunload = null; // Should get bfcache behavior.
|
||||
opener.setTimeout("SpecialPowers.wrap(testWindow).history.back();", 250);
|
||||
window.opener.case3WaitForBlank();
|
||||
window.location.href = "about:blank";
|
||||
break;
|
||||
}
|
||||
|
@ -54,6 +54,14 @@ function nextTest_() {
|
||||
}
|
||||
}
|
||||
|
||||
async function case3WaitForBlank() {
|
||||
let loaded = SimpleTest.promiseWaitForCondition(() => {
|
||||
return testWindow.location.href == "about:blank";
|
||||
});
|
||||
await loaded;
|
||||
SpecialPowers.wrap(testWindow).history.back();
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
setTimeout(nextTest_, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user