Bug 1315887 - Re-enable browser_locationBarExternalLoad.js by making it less race-y. r=mak

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2018-12-12 12:50:00 +00:00
Родитель 82851dd603
Коммит 960b746b17
2 изменённых файлов: 5 добавлений и 3 удалений

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

@ -44,7 +44,6 @@ support-files =
[browser_dragdropURL.js]
[browser_locationBarCommand.js]
[browser_locationBarExternalLoad.js]
skip-if = true # Bug 1315887
[browser_moz_action_link.js]
[browser_new_tab_urlbar_reset.js]
[browser_page_action_menu.js]

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

@ -45,9 +45,12 @@ async function testURL(url, loadFunc, endFunc) {
let browser = tab.linkedBrowser;
let pagePrincipal = gBrowser.contentPrincipal;
// We need to ensure that we set the pageshow event listener before running
// loadFunc, otherwise there's a chance that the content process will finish
// loading the page and fire pageshow before the event listener gets set.
let pageShowPromise = BrowserTestUtils.waitForContentEvent(browser, "pageshow");
loadFunc(url);
await BrowserTestUtils.waitForContentEvent(browser, "pageshow");
await pageShowPromise;
await ContentTask.spawn(browser, { isRemote: gMultiProcessBrowser },
async function(arg) {