Bug 1589470 - Wait for the temporary favicon to change before validating. r=jdescottes

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Logan Smyth 2020-03-23 08:32:54 +00:00
Родитель 6260a0f6e4
Коммит b1c58ab1b9
1 изменённых файлов: 11 добавлений и 1 удалений

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

@ -26,7 +26,17 @@ add_task(async function() {
const { document, tab, window } = await openAboutDebugging();
await selectThisFirefoxPage(document, window.AboutDebugging.store);
await waitUntil(() => findDebugTargetByText("Favicon tab", document));
await waitUntil(() => {
const target = findDebugTargetByText("Favicon tab", document);
if (!target) {
return false;
}
// We may get a default globe.svg icon for a short period of time while
// the target tab is still loading.
return target
.querySelector(".qa-debug-target-item-icon")
.src.includes("data:");
});
const faviconTabTarget = findDebugTargetByText("Favicon tab", document);
const faviconTabIcon = faviconTabTarget.querySelector(
".qa-debug-target-item-icon"