gecko-dev/testing/mochitest
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
..
BrowserTestUtils Bug 1469334 - Properly document arguments for ContentTaskUtils.waitForCondition. r=jmaher 2018-06-18 18:39:40 +02:00
MochiKit
baselinecoverage Bug 1455401 - Generate baseline code coverage reports. r=jmaher,marco 2018-04-25 15:22:28 -04:00
chrome Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00
dynamic
embed
manifests
pywebsocket
ssltunnel
static
tests Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt 2018-06-27 11:10:02 -04:00
README.txt
ShutdownLeaksCollector.jsm Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00
__init__.py
bisection.py
bootstrap.js
browser-harness.xul
browser-test.js Bug 1458375 - Make browser mochitests wait for browser-idle-startup-tasks-finished before running tests. r=kmag 2018-06-05 14:21:53 -07:00
chrome-harness.js Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00
chunkifyTests.js
favicon.ico Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy 2018-06-28 16:06:09 -07:00
gen_template.pl
harness.xul
install.rdf
jar.mn
leaks.py
mach_commands.py
mach_test_package_commands.py
manifest.webapp
manifestLibrary.js Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00
mochitest-e10s-utils.js
mochitest_options.py Bug 1466958 - Fix mochitests when run locally against an android build. r=gbrown 2018-06-05 17:09:54 -05:00
moz.build Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy 2018-06-28 16:06:09 -07:00
nested_setup.js Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00
pywebsocket_wrapper.py
redirect.html
rungeckoview.py
runjunit.py Bug 1470177 - Improve timeout handling in runjunit.py; r=bc 2018-06-25 10:09:45 -06:00
runrobocop.py Bug 1460610: Fix content process whitelist for profile extensions when none are present at startup. r=aswan 2018-05-19 17:23:01 -07:00
runtests.py Bug 1462489 - Use test addons from dist/xpi-stage when running mochitests locally. r=ahal 2018-05-30 15:21:39 -07:00
runtestsremote.py Bug 1462182 - Dump less device info during Android test-verify; r=jmaher 2018-05-17 16:19:02 -06:00
server.js Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj 2018-05-19 20:17:45 -07:00
shutdown-leaks-collector.js
start_desktop.js Bug 1457835 - Enable ESLint for testing/mochitest (manual changes). r=jmaher 2018-04-30 11:03:44 +01:00

README.txt

See https://developer.mozilla.org/en/docs/Mochitest for detailed information on running and writing mochitests.