let icon1;
let promiseIcon1 = PlacesTestUtils.waitForNotification( "favicon-changed",
events =>
events.some(e => { if (e.url == origURL) {
icon1 = e.faviconUrl; returntrue;
} returnfalse;
})
);
let icon2;
let promiseIcon2 = PlacesTestUtils.waitForNotification( "favicon-changed",
events =>
events.some(e => { if (e.url == newURL) {
icon2 = e.faviconUrl; returntrue;
} returnfalse;
})
);
// The page at origURL has a <link rel='icon'>, so we should get a call into // our observer below when it loads. Once we verify that we have the right // favicon URI, we call pushState, which should trigger another favicon change // event, this time for the URI after pushState.
let tab = BrowserTestUtils.addTab(gBrowser, origURL);
await promiseIcon1;
is(icon1, faviconURL, "FaviconURL for original URI"); // Ignore the promise returned here and wait for the next // onPageChanged notification.
SpecialPowers.spawn(tab.linkedBrowser, [], function () {
content.history.pushState("", "", "?new_page");
});
await promiseIcon2;
is(icon2, faviconURL, "FaviconURL for new URI");
gBrowser.removeTab(tab);
});
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.39Angebot
Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.