browser_mixed_content.js (817B)
1 add_task(async () => { 2 await SpecialPowers.pushPrefEnv({ 3 set: [["security.mixed_content.upgrade_display_content", false]], 4 }); 5 6 const testPath = 7 "https://example.com/browser/browser/base/content/test/favicons/file_insecure_favicon.html"; 8 const expectedIcon = 9 "http://example.com/browser/browser/base/content/test/favicons/file_favicon.png"; 10 11 let tab = BrowserTestUtils.addTab(gBrowser, testPath); 12 gBrowser.selectedTab = tab; 13 let browser = tab.linkedBrowser; 14 15 let faviconPromise = waitForLinkAvailable(browser); 16 await BrowserTestUtils.browserLoaded(browser); 17 let iconURI = await faviconPromise; 18 is(iconURI, expectedIcon, "Got correct icon."); 19 20 ok( 21 gIdentityHandler._isMixedPassiveContentLoaded, 22 "Should have seen mixed content." 23 ); 24 25 BrowserTestUtils.removeTab(tab); 26 });