зеркало из 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:
Родитель
b0aa2f69f3
Коммит
8ed0970932
|
@ -135,6 +135,11 @@ function openBrowserWindowIntl() {
|
|||
|
||||
function startBrowserTests() {
|
||||
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
|
||||
addA11yLoadEvent(gBrowserContext.testFunc, currentBrowser().contentWindow);
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче