зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1607984 - P15. Wait for the load to start before setting the event handler. r=Jamie
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event. Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts. So the window passed to addAllyLoadEvent would have been of the about:blank page. The current code was based on an observable behaviour which was that the load was occuring synchronously. DocumentChannel broke that assumption. Differential Revision: https://phabricator.services.mozilla.com/D70799
This commit is contained in:
Родитель
fd96268c9a
Коммит
013d7a3a84
|
@ -135,6 +135,11 @@ function openBrowserWindowIntl() {
|
||||||
|
|
||||||
function startBrowserTests() {
|
function startBrowserTests() {
|
||||||
if (gBrowserContext.startURL) {
|
if (gBrowserContext.startURL) {
|
||||||
|
// Make sure the window is the one loading our URL.
|
||||||
|
if (currentBrowser().contentWindow.location != gBrowserContext.startURL) {
|
||||||
|
setTimeout(startBrowserTests, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// wait for load
|
// wait for load
|
||||||
addA11yLoadEvent(gBrowserContext.testFunc, currentBrowser().contentWindow);
|
addA11yLoadEvent(gBrowserContext.testFunc, currentBrowser().contentWindow);
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче