mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
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
This commit is contained in:
parent
204fe23163
commit
aaea0203ca
@ -51,3 +51,7 @@ support-files =
|
||||
[browser_rooticon.js]
|
||||
support-files =
|
||||
blank.html
|
||||
[browser_mixed_content.js]
|
||||
support-files =
|
||||
file_insecure_favicon.html
|
||||
file_favicon.png
|
||||
|
17
browser/base/content/test/favicons/browser_mixed_content.js
Normal file
17
browser/base/content/test/favicons/browser_mixed_content.js
Normal file
@ -0,0 +1,17 @@
|
||||
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);
|
||||
});
|
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>Favicon Test for mixed content</title>
|
||||
<link rel="icon" type="image/png" href="http://example.com/browser/browser/base/content/test/favicons/file_favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
Favicon!!
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user