Bug 1668297 - Fix browser/base/content/test/tabs/browser_e10s_switchbrowser.js r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D92033
This commit is contained in:
Andreas Farre 2020-10-01 12:46:16 +00:00
Родитель 0289c4d0f9
Коммит c25dc7a7ce
1 изменённых файлов: 14 добавлений и 2 удалений

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

@ -197,7 +197,7 @@ add_task(async function test_navigation() {
// Load a non-remote page
await waitForLoad("about:robots");
await TestUtils.waitForCondition(
() => gBrowser.selectedBrowser.contentTitle != "about:robots",
() => !!gBrowser.selectedBrowser.contentTitle.length,
"Waiting for about:robots title to update"
);
is(
@ -239,6 +239,10 @@ add_task(async function test_navigation() {
permanentKey,
"browser.permanentKey is still the same"
);
await TestUtils.waitForCondition(
() => !!gBrowser.selectedBrowser.contentTitle.length,
"Waiting for about:robots title to update"
);
await check_history();
info("6");
@ -267,6 +271,10 @@ add_task(async function test_navigation() {
permanentKey,
"browser.permanentKey is still the same"
);
await TestUtils.waitForCondition(
() => !!gBrowser.selectedBrowser.contentTitle.length,
"Waiting for about:robots title to update"
);
await check_history();
info("8");
@ -285,6 +293,10 @@ add_task(async function test_navigation() {
info("9");
await back();
await TestUtils.waitForCondition(
() => !!gBrowser.selectedBrowser.contentTitle.length,
"Waiting for about:robots title to update"
);
is(
gBrowser.selectedBrowser.isRemoteBrowser,
false,
@ -442,7 +454,7 @@ add_task(async function test_loadflags() {
// Load a non-remote page
await waitForLoadWithFlags("about:robots");
await TestUtils.waitForCondition(
() => gBrowser.selectedBrowser.contentTitle != "about:robots",
() => !!gBrowser.selectedBrowser.contentTitle.length,
"Waiting for about:robots title to update"
);
is(