Bug 1844699 - Attempt to fix waiting for the remote favicon. r=mkmelin

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Giger 2023-09-20 19:22:54 +00:00
Родитель 9b347e9474
Коммит 9f2a3f290a
1 изменённых файлов: 4 добавлений и 6 удалений

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

@ -14,8 +14,6 @@ const { PromiseTestUtils } = ChromeUtils.import(
const TEST_DOCUMENT_URL =
"http://mochi.test:8888/browser/comm/mail/base/test/browser/files/sampleContent.html";
const TEST_IMAGE_URL =
"http://mochi.test:8888/browser/comm/mail/base/test/browser/files/tb-logo.png";
let tabmail = document.getElementById("tabmail");
let rootFolder, testFolder, testMessages;
@ -90,10 +88,10 @@ add_task(async function testContentTab() {
await BrowserTestUtils.browserLoaded(tab.browser);
let icon = tab.tabNode.querySelector(".tab-icon-image");
// Start of TEST_IMAGE_URL as data url.
await TestUtils.waitForCondition(
() => icon.src.startsWith("data:image/png;base64,iVBORw0KGgoAAAANSUhEU"),
"Waited for icon to be correct"
await BrowserTestUtils.waitForMutationCondition(
icon,
{ attributes: true, attributeFilter: ["src"] },
() => icon.src.startsWith("data:image/png;base64,iVBORw0KGgoAAAANSUhEU")
);
});