Bug 1453723 - ensure we wait for the correct load, r=bgrins

Waiting for the browser to have switched remoteness before waiting for
it to load the non-about:preferences page should be enough to address this orange.

Differential Revision: https://phabricator.services.mozilla.com/D4208

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2018-08-24 16:30:11 +00:00
Родитель db1d979c2f
Коммит 1dc1b8da53
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -16,6 +16,9 @@ add_task(async function clearURLBarAfterParentProcessURL() {
}, {capture: true, once: true});
});
document.getElementById("home-button").click();
if (!tab.linkedBrowser.isRemoteBrowser) {
await BrowserTestUtils.waitForEvent(tab.linkedBrowser, "XULFrameLoaderCreated");
}
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
is(gURLBar.value, "", "URL bar should be empty");
is(tab.linkedBrowser.userTypedValue, null, "The browser should have no recorded userTypedValue");
@ -36,6 +39,9 @@ add_task(async function clearURLBarAfterParentProcessURLInExistingTab() {
newTabBrowser.loadURI("about:preferences");
});
document.getElementById("home-button").click();
if (!tab.linkedBrowser.isRemoteBrowser) {
await BrowserTestUtils.waitForEvent(tab.linkedBrowser, "XULFrameLoaderCreated");
}
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
is(gURLBar.value, "", "URL bar should be empty");
is(tab.linkedBrowser.userTypedValue, null, "The browser should have no recorded userTypedValue");