gecko-dev/dom/security/test/general
Dave Townsend d8b7fb22e3 Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy
Summary:
This moves the load of favicons into the content process. We use the same logic
for finding favicons (based on waiting until none have shown up for a short
time) but then load the favicon and convert it to a data uri which we then
dispatch to the parent process. Along the way this fixes asssociating the load
with the tab for WebExtension and devtools, fixes CSP usage for the load, fixes
expiry detection of the favicon and stops us from loading the same resource
twice.

This change also merges the prefs browser.chrome.site_icons and
browser.chrome.favicons leaving just the former controlling favicon loading. It
adds the pref browser.chrome.guess_favicon to allow disabling guessing where
a favicon might be located for a site (at <hostname>/favicon.ico). This is
mainly to allow disabling this in tests where those additional yet automatic
requests are uninteresting for the test.

There are multiple clean-ups that can follow this but this is a first step along
that path.

MozReview-Commit-ID: E0Cs59UnxaF

Reviewers: mak

Tags: #secure-revision

Bug #: 1453751

Differential Revision: https://phabricator.services.mozilla.com/D1672
Differential Revision: https://phabricator.services.mozilla.com/D1673
Differential Revision: https://phabricator.services.mozilla.com/D1674
Differential Revision: https://phabricator.services.mozilla.com/D1850
Differential Revision: https://phabricator.services.mozilla.com/D1869

--HG--
rename : browser/base/content/test/general/browser_bug408415.js => browser/base/content/test/favicons/browser_bug408415.js
rename : browser/base/content/test/general/browser_bug550565.js => browser/base/content/test/favicons/browser_bug550565.js
rename : browser/base/content/test/general/browser_favicon_change.js => browser/base/content/test/favicons/browser_favicon_change.js
rename : browser/base/content/test/general/browser_favicon_change_not_in_document.js => browser/base/content/test/favicons/browser_favicon_change_not_in_document.js
rename : browser/base/content/test/general/browser_subframe_favicons_not_used.js => browser/base/content/test/favicons/browser_subframe_favicons_not_used.js
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon1.ico
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon2.ico
rename : browser/base/content/test/general/file_bug970276_popup1.html => browser/base/content/test/favicons/file_bug970276_popup1.html
rename : browser/base/content/test/general/file_bug970276_popup2.html => browser/base/content/test/favicons/file_bug970276_popup2.html
rename : browser/base/content/test/general/file_favicon_change.html => browser/base/content/test/favicons/file_favicon_change.html
rename : browser/base/content/test/general/file_favicon_change_not_in_document.html => browser/base/content/test/favicons/file_favicon_change_not_in_document.html
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_generic_favicon.ico
rename : browser/base/content/test/general/file_with_favicon.html => browser/base/content/test/favicons/file_with_favicon.html
extra : rebase_source : 6372b2681a59d267f966e9fa2ca9a54e3ff0cea0
extra : intermediate-source : b11aa832c41ac5beef9065f804d11fb7c9887990
extra : source : 638eb8a41245f6d9932861afda21edd5e0b2618a
2018-06-28 16:06:09 -07:00
..
browser_test_data_download.js Bug 1425363 - remove onWindowTitleChanged given that nobody uses it, r=bgrins 2017-12-14 21:55:44 -06:00
browser_test_data_text_csv.js Bug 1425363 - remove onWindowTitleChanged given that nobody uses it, r=bgrins 2017-12-14 21:55:44 -06:00
browser_test_FTP_console_warning.js Bug 1454813: Part 1b - Stop automatically exposing Task singleton to browser tests. r=florian 2018-04-19 14:52:47 -07:00
browser_test_toplevel_data_navigations.js Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
browser_test_view_image_data_navigation.js Bug 1407891: Test navigation for right-click view-image on data:image/svg. r=bz 2017-11-08 17:43:26 +01:00
browser.ini Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
bug1277803.html
chrome.ini Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
favicon_bug1277803.ico
file_block_script_wrong_mime_server.sjs
file_block_subresource_redir_to_data.sjs Bug 1432137 - Add test to verify insecure redirects to data: URIs are blocked for script modules. r=jonco 2018-01-23 14:04:21 +01:00
file_block_toplevel_data_navigation2.html
file_block_toplevel_data_navigation3.html Bug 1414541 - Intermittent failure fixed for toplevel data: URI. r=ckerschb 2018-03-21 17:18:00 -04:00
file_block_toplevel_data_navigation.html Bug 1414541 - Intermittent failure fixed for toplevel data: URI. r=ckerschb 2018-03-21 17:18:00 -04:00
file_block_toplevel_data_redirect.sjs
file_contentpolicytype_targeted_link_iframe.sjs
file_data_download.html Bug 1403641: Test data: URI download. r=bz 2017-10-04 08:44:36 +02:00
file_data_text_csv.html Bug 1403814: Test navigation to data:text/csv. r=smaug 2017-10-11 22:47:12 +02:00
file_FTP_console_warning.html Bug 1404744 - Simple sub-resource only test. r=ckerschb 2018-04-01 20:07:06 +02:00
file_nosniff_testserver.sjs
file_same_site_cookies_about_inclusion.html Bug 1454721 - Add same-site cookie test for about:blank and about:srcdoc. r=dveditz 2018-04-18 10:27:28 +02:00
file_same_site_cookies_about_navigation.html Bug 1454721 - Add same-site cookie test for about:blank and about:srcdoc. r=dveditz 2018-04-18 10:27:28 +02:00
file_same_site_cookies_about.sjs Bug 1455162 - Test about: URLs with and without same-site.enabled. r=ckerschb 2018-04-18 17:01:01 -07:00
file_same_site_cookies_blob_iframe_inclusion.html Bug 1454027 - Test SameSite cookie handling inside iframes.r=mgoodwin 2018-04-17 18:26:15 +02:00
file_same_site_cookies_blob_iframe_navigation.html Bug 1454027 - Test SameSite cookie handling inside iframes.r=mgoodwin 2018-04-17 18:26:15 +02:00
file_same_site_cookies_cross_origin_context.sjs Bug 1452699 - Work-around caching issues in test_same_site_cookies_*. r=ckerschb 2018-04-13 18:49:58 -07:00
file_same_site_cookies_from_script.sjs Bug 1452699 - Work-around caching issues in test_same_site_cookies_*. r=ckerschb 2018-04-13 18:49:58 -07:00
file_same_site_cookies_iframe.html Bug 1454027 - Test SameSite cookie handling inside iframes.r=mgoodwin 2018-04-17 18:26:15 +02:00
file_same_site_cookies_iframe.sjs Bug 1454027 - Test SameSite cookie handling inside iframes.r=mgoodwin 2018-04-17 18:26:15 +02:00
file_same_site_cookies_redirect.sjs Bug 1456407: Add test for same site cookies using a meta refresh. r=mgoodwin 2018-04-24 11:08:00 +02:00
file_same_site_cookies_subrequest.sjs Bug 1452699 - Work-around caching issues in test_same_site_cookies_*. r=ckerschb 2018-04-13 18:49:58 -07:00
file_same_site_cookies_toplevel_nav.sjs Bug 1452699 - Work-around caching issues in test_same_site_cookies_*. r=ckerschb 2018-04-13 18:49:58 -07:00
file_same_site_cookies_toplevel_set_cookie.sjs Bug 1454242: Test samesite cookie on top-level page from cross-origin context. r=mgoodwin 2018-04-16 08:51:33 +02:00
file_toplevel_data_meta_redirect.html
file_toplevel_data_navigations.sjs
file_view_image_data_navigation.html Bug 1407891: Test navigation for right-click view-image on data:image/svg. r=bz 2017-11-08 17:43:26 +01:00
mochitest.ini Bug 1456882 - Enable some passing mochitests on linux64-qr. r=jrmuizel 2018-04-25 11:29:07 -04:00
test_allow_opening_data_json.html Bug 1403870: Test toplevel data URI navigation to application/json is allowed. r=smaug 2017-11-03 13:27:01 +01:00
test_allow_opening_data_pdf.html Bug 1398692: Test toplevel navigation to a data:application/pdf. r=bz 2017-09-14 07:37:07 +02:00
test_block_script_wrong_mime.html
test_block_subresource_redir_to_data.html Bug 1432137 - Add test to verify insecure redirects to data: URIs are blocked for script modules. r=jonco 2018-01-23 14:04:21 +01:00
test_block_toplevel_data_img_navigation.html Bug 1403814 - Update tests for toplevel data URI blocking because we know block after we have received the response. r=smaug 2017-11-03 13:22:57 +01:00
test_block_toplevel_data_navigation.html Bug 1414541 - Intermittent failure fixed for toplevel data: URI. r=ckerschb 2018-03-21 17:18:00 -04:00
test_bug1277803.xul Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy 2018-06-28 16:06:09 -07:00
test_contentpolicytype_targeted_link_iframe.html Bug 1439713 - Update tests relying on nsIContentPolicy. r=bz 2018-03-29 11:14:58 +02:00
test_nosniff.html Bug 1397740 - Removed security.xcto_nosniff_block_images from about:config r=ckerschb,fkiefer 2018-01-05 10:43:17 +01:00
test_same_site_cookies_about.html Bug 1455162 - Test about: URLs with and without same-site.enabled. r=ckerschb 2018-04-18 17:01:01 -07:00
test_same_site_cookies_cross_origin_context.html Bug 1452699 - Add a temporary pref to disable same-site cookies. r=ckerschb,valentin 2018-04-13 18:52:28 -07:00
test_same_site_cookies_from_script.html Bug 1452699 - Add a temporary pref to disable same-site cookies. r=ckerschb,valentin 2018-04-13 18:52:28 -07:00
test_same_site_cookies_iframe.html Bug 1454027 - Test SameSite cookie handling inside iframes.r=mgoodwin 2018-04-17 18:26:15 +02:00
test_same_site_cookies_redirect.html Bug 1456407: Add test for same site cookies using a meta refresh. r=mgoodwin 2018-04-24 11:08:00 +02:00
test_same_site_cookies_subrequest.html Bug 1452699 - Add a temporary pref to disable same-site cookies. r=ckerschb,valentin 2018-04-13 18:52:28 -07:00
test_same_site_cookies_toplevel_nav.html Bug 1452699 - Add a temporary pref to disable same-site cookies. r=ckerschb,valentin 2018-04-13 18:52:28 -07:00
test_same_site_cookies_toplevel_set_cookie.html Bug 1454242: Test samesite cookie on top-level page from cross-origin context. r=mgoodwin 2018-04-16 08:51:33 +02:00