зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f90a2a6d1e
Коммит
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче