mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1492482 - Remove CPOW usage from browser_urlbarKeepStateAcrossTabSwitches.js. r=Gijs
Depends on D6953 Differential Revision: https://phabricator.services.mozilla.com/D6954 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
11645f29ef
commit
4c4d1d51b4
@ -8,9 +8,13 @@ add_task(async function() {
|
||||
let input = "i-definitely-dont-exist.example.com";
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank", false);
|
||||
let browser = tab.linkedBrowser;
|
||||
// NB: CPOW usage because new tab pages can be preloaded, in which case no
|
||||
// load events fire.
|
||||
await BrowserTestUtils.waitForCondition(() => browser.contentDocumentAsCPOW && !browser.contentDocumentAsCPOW.hidden);
|
||||
// Note: Waiting on content document not being hidden because new tab pages can be preloaded,
|
||||
// in which case no load events fire.
|
||||
await ContentTask.spawn(browser, null, async () => {
|
||||
await ContentTaskUtils.waitForCondition(() => {
|
||||
return content.document && !content.document.hidden;
|
||||
});
|
||||
});
|
||||
let errorPageLoaded = BrowserTestUtils.waitForErrorPage(tab.linkedBrowser);
|
||||
gURLBar.value = input;
|
||||
gURLBar.select();
|
||||
@ -32,9 +36,13 @@ add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({set: [["keyword.enabled", false]]});
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank", false);
|
||||
let browser = tab.linkedBrowser;
|
||||
// NB: CPOW usage because new tab pages can be preloaded, in which case no
|
||||
// load events fire.
|
||||
await BrowserTestUtils.waitForCondition(() => browser.contentDocumentAsCPOW && !browser.contentDocumentAsCPOW.hidden);
|
||||
// Note: Waiting on content document not being hidden because new tab pages can be preloaded,
|
||||
// in which case no load events fire.
|
||||
await ContentTask.spawn(browser, null, async () => {
|
||||
await ContentTaskUtils.waitForCondition(() => {
|
||||
return content.document && !content.document.hidden;
|
||||
});
|
||||
});
|
||||
let errorPageLoaded = BrowserTestUtils.waitForErrorPage(tab.linkedBrowser);
|
||||
gURLBar.value = input;
|
||||
gURLBar.select();
|
||||
|
Loading…
Reference in New Issue
Block a user