Bug 1492482 - Remove CPOW usage from browser_aboutnewtab_process_selection.js. r=Felipe

Depends on D6967

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2018-10-02 18:02:11 +00:00
Родитель 5de8450ded
Коммит 081ae03e2b
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -18,9 +18,10 @@ async function ensurePreloaded(gBrowser) {
gBrowser._createPreloadBrowser();
// We cannot use the regular BrowserTestUtils helper for waiting here, since that
// would try to insert the preloaded browser, which would only break things.
await BrowserTestUtils.waitForCondition( () => {
let doc = gBrowser._preloadedBrowser.contentDocumentAsCPOW;
return doc && doc.readyState == "complete";
await ContentTask.spawn(gBrowser._preloadedBrowser, null, async () => {
await ContentTaskUtils.waitForCondition(() => {
return content.document && content.document.readyState == "complete";
});
});
}