fune/browser/base/content/test/favicons/browser_mixed_content.js
Dave Townsend aaea0203ca Bug 1484753: Loading an insecure favicon should make the page show as mixed content. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D3908

--HG--
extra : rebase_source : 5ee794a7079a8b7c42df18f8a7638344bb00dece
2018-08-21 10:40:42 -07:00

17 lines
684 B
JavaScript

add_task(async () => {
const testPath = "https://example.com/browser/browser/base/content/test/favicons/file_insecure_favicon.html";
const expectedIcon = "http://example.com/browser/browser/base/content/test/favicons/file_favicon.png";
let tab = BrowserTestUtils.addTab(gBrowser, testPath);
gBrowser.selectedTab = tab;
let browser = tab.linkedBrowser;
let faviconPromise = waitForLinkAvailable(browser);
await BrowserTestUtils.browserLoaded(browser);
let iconURI = await faviconPromise;
is(iconURI, expectedIcon, "Got correct icon.");
ok(gIdentityHandler._isMixedPassiveContentLoaded, "Should have seen mixed content.");
BrowserTestUtils.removeTab(tab);
});