Removing multiple tabs via extensions now calls `gBrowser.removeTabs()`
once for each window that has tabs being removed. Also adds automated
browser tests for removing one tab or multiple tabs.
Differential Revision: https://phabricator.services.mozilla.com/D93438
This also fixes an issue where MockFilePicker wouldn't set the mode correctly,
which caused it to always use "modeOpen". For this test we need to pass
"modeGetFolder" in order for the prompt to show.
Differential Revision: https://phabricator.services.mozilla.com/D96526
The previous approach was autofilling partial subdomains from search engines.
Having a search engine pointing to "developer.mozilla.org, when "moz" was typed
we ended up autofilling "moz[illa.org]" but pointing to "developer.mozilla.org".
Unfortunately that made impossible to actually go to "mozilla.org" by typing it.
The new approach instead allows tab-to-search results to appear even if there's
no autofill, because the provider checks autonomously the autofill threshold.
There's a downside though, with the old approach we could return more partial
matches, and the Muxer would pick one, depending on the autofilled host. For
example we could return "rover.ebay.com" and match it to "eb[ay.it]".
With the new approach we don't have an autofilled host, and fetching it would
be expensive, we can only compare the search string with the engine's host.
For this reason the patch also tries to partially match against the searchForm
host, that often points to a page the user visits more often.
Differential Revision: https://phabricator.services.mozilla.com/D96942
UPDATED
-------
browser/components/extensions/test/browser/browser_ext_browsingData_pluginData.js
Test plugindata part of the browsingData extension's use of nsIClearDataService.
Have test attempt to clear non-existent data. Test that browsingData APIs do not cause exceptions.
REMOVED
-------
browser/components/enterprisepolicies/tests/browser/browser_policy_disable_flash_plugin.js
Bug 1429169
Flash ctp/disabled by enterprise policy.
Differential Revision: https://phabricator.services.mozilla.com/D95907
UPDATED
-------
browser/base/content/test/plugins/browser_CTP_favorfallback.js
Test that plugin fallback behavior is correct.
Updated to reflect that plugins always show "alternate" content, which is either the user fallback of the browser's transparent fallback, regardless of the HTML.
browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
Test that overlay is visible (in layout sense) only if plugin is partially or completely visible.
Changed to test new fallback behavior where overlay is a hidden element with "blockall" atribute.
browser/base/content/test/plugins/browser_CTP_zoom.js
Test that overlay is present and visible at multiple zoom levels.
Adjusted to work with hidden overlay.
browser/base/content/test/performance/browser_startup_mainthreadio.js
Track IO done at browser startup
Removed `UserPlugins.parent` from list since we no longer scan for plugins.
browser/base/content/test/plugins/browser_bug797677.js
bug 797677
Test that plugin instantiation fails (with PLUGIN_UNSUPPORTED and no console error) when MIME type missing.
Removed the cleanup of (unused) test plugin.
browser/base/content/test/contextMenu/browser_contextmenu.js
Test context menu for many types of elements
Removed plugin element portion.
REMOVED
-------
browser/base/content/test/plugins/browser_CTP_contextmenu.js
Test that the CTP activate action in content menus for plugins works
browser/base/content/test/plugins/browser_CTP_crashreporting.js
Test that plugin crash submissions still work properly after click-to-play activation.
browser/base/content/test/plugins/browser_CTP_drag_drop.js
Test that plugin CTP dialog behaves correctly when dragging tab out of/into a window
browser/base/content/test/plugins/browser_CTP_hide_overlay.js
Test ability to close plugin "overlay" placeholder (the grey lego element)
browser/base/content/test/plugins/browser_CTP_iframe.js
Test that overlay can be interacted with (closed) when in an iframe
browser/base/content/test/plugins/browser_CTP_nonplugins.js
Bug 926605
Says it tests that non-plugin <object> elements don't show CTP but it doesn't. It tests that removing a CTP plugin from a page does not remove CTP dialog (in case, for example, page shows, then quickly removes plugin).
browser/base/content/test/plugins/browser_CTP_overlay_styles.js
Verify that styling on overlay elements, based on sizing, is correct.
browser/base/content/test/plugins/browser_CTP_resize.js
Test that a resize properly updates the overlay styling, which is only visible when large enough.
browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
Test that partially obscured plugins show the overlay, properly styled (when they should).
browser/base/content/test/plugins/browser_blocking.js
bug 1129040
Test CTP behavior -- overlay dialog behavior, vulnerable plugin user approval, plugin's infoURL, etc.
browser/base/content/test/plugins/browser_blocklist_content.js
bug 1129040
Test (plugin) blocklist, including attempt to "hack" it in a content process.
browser/base/content/test/plugins/browser_bug743421.js
Test CTP approval persists for new plugin instances in page.
browser/base/content/test/plugins/browser_bug744745.js
Test that CTP notification correctly appears despite plugin with opacity: 0 !important
browser/base/content/test/plugins/browser_bug787619.js
bug 787619
Make sure CTP works for plugins nested inside <a></a> elements.
browser/base/content/test/plugins/browser_bug812562.js
bug 812562
Navigating away from, then back to a page should restore its CTP status.
browser/base/content/test/plugins/browser_bug818118.js
bug 818118
Test that CTP plugin and "unknown" plugin type work correctly on same page.
browser/base/content/test/plugins/browser_clearplugindata.js
Test clearing plugin data using Sanitizer.jsm
browser/base/content/test/plugins/browser_iterate_hidden_plugins.js
Bug 1318383
Test `plugins.navigator.hidden_ctp_plugin`, which hides CTP plugins from `navigator.plugins`.
browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
Test plugin crash detection and reporting
browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
Bug 1110887
Test both "plugin process crash notification" orders -- content proc before main proc and vice-versa.
browser/base/content/test/plugins/browser_plugin_reloading.js
Bug 1129040
Re-instantiating plugin (using `plugin.src = new_value`) should retain CTP approval.
browser/base/content/test/plugins/browser_plugin_framed_domain.js
Plugin CTP prompts should adopt top-level page's principal for instead of closest frame's principal.
browser/base/content/test/plugins/browser_pluginnotification.js
Tests many CTP interface behavior cases -- doorhangers, overlays, multiple plugin instances, CTP choices (always, allow, never)
browser/base/content/test/plugins/browser_private_clicktoplay.js
Make sure CTP interface works in private windows
browser/base/content/test/plugins/browser_subframe_access_hidden_plugins.js
Allow navigator.plugins to list plugin after CTP approval, even if it listed in `plugins.navigator.hidden_ctp_plugin`
Differential Revision: https://phabricator.services.mozilla.com/D95906
The browser currently only enables plugin behavior for Flash and our internal test plugins. This patch replaces support for those plugins with a simple fallback that shows a transparent region where the plugin would have been. It removes the file system search(es) for the plugin dynamic libraries and short-circuits the logic to determine if plugins should do something special -- all implementations now behave the same in the presence of plugin elements.
The new behavior is:
1. If the <object> or <embed> element lists a type of something other than "x-shockwave-flash" or "x-test" then the behavior is unchanged. This means that non-plugin types behave properly and unknown types (for example, typos) are also unaffected (they reduce to 0x0 elements).
2. If the <object> element has an HTML fallback in the DOM (see spec for <object> elements) then the fallback is always shown.
3. Otherwise, the element is shown as a transparent region with the size specified in attributes.
Differential Revision: https://phabricator.services.mozilla.com/D95902
UPDATED
-------
browser/components/extensions/test/browser/browser_ext_browsingData_pluginData.js
Test plugindata part of the browsingData extension's use of nsIClearDataService.
Have test attempt to clear non-existent data. Test that browsingData APIs do not cause exceptions.
REMOVED
-------
browser/components/enterprisepolicies/tests/browser/browser_policy_disable_flash_plugin.js
Bug 1429169
Flash ctp/disabled by enterprise policy.
Differential Revision: https://phabricator.services.mozilla.com/D95907
UPDATED
-------
browser/base/content/test/plugins/browser_CTP_favorfallback.js
Test that plugin fallback behavior is correct.
Updated to reflect that plugins always show "alternate" content, which is either the user fallback of the browser's transparent fallback, regardless of the HTML.
browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
Test that overlay is visible (in layout sense) only if plugin is partially or completely visible.
Changed to test new fallback behavior where overlay is a hidden element with "blockall" atribute.
browser/base/content/test/plugins/browser_CTP_zoom.js
Test that overlay is present and visible at multiple zoom levels.
Adjusted to work with hidden overlay.
browser/base/content/test/performance/browser_startup_mainthreadio.js
Track IO done at browser startup
Removed `UserPlugins.parent` from list since we no longer scan for plugins.
browser/base/content/test/plugins/browser_bug797677.js
bug 797677
Test that plugin instantiation fails (with PLUGIN_UNSUPPORTED and no console error) when MIME type missing.
Removed the cleanup of (unused) test plugin.
browser/base/content/test/contextMenu/browser_contextmenu.js
Test context menu for many types of elements
Removed plugin element portion.
REMOVED
-------
browser/base/content/test/plugins/browser_CTP_contextmenu.js
Test that the CTP activate action in content menus for plugins works
browser/base/content/test/plugins/browser_CTP_crashreporting.js
Test that plugin crash submissions still work properly after click-to-play activation.
browser/base/content/test/plugins/browser_CTP_drag_drop.js
Test that plugin CTP dialog behaves correctly when dragging tab out of/into a window
browser/base/content/test/plugins/browser_CTP_hide_overlay.js
Test ability to close plugin "overlay" placeholder (the grey lego element)
browser/base/content/test/plugins/browser_CTP_iframe.js
Test that overlay can be interacted with (closed) when in an iframe
browser/base/content/test/plugins/browser_CTP_nonplugins.js
Bug 926605
Says it tests that non-plugin <object> elements don't show CTP but it doesn't. It tests that removing a CTP plugin from a page does not remove CTP dialog (in case, for example, page shows, then quickly removes plugin).
browser/base/content/test/plugins/browser_CTP_overlay_styles.js
Verify that styling on overlay elements, based on sizing, is correct.
browser/base/content/test/plugins/browser_CTP_resize.js
Test that a resize properly updates the overlay styling, which is only visible when large enough.
browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
Test that partially obscured plugins show the overlay, properly styled (when they should).
browser/base/content/test/plugins/browser_blocking.js
bug 1129040
Test CTP behavior -- overlay dialog behavior, vulnerable plugin user approval, plugin's infoURL, etc.
browser/base/content/test/plugins/browser_blocklist_content.js
bug 1129040
Test (plugin) blocklist, including attempt to "hack" it in a content process.
browser/base/content/test/plugins/browser_bug743421.js
Test CTP approval persists for new plugin instances in page.
browser/base/content/test/plugins/browser_bug744745.js
Test that CTP notification correctly appears despite plugin with opacity: 0 !important
browser/base/content/test/plugins/browser_bug787619.js
bug 787619
Make sure CTP works for plugins nested inside <a></a> elements.
browser/base/content/test/plugins/browser_bug812562.js
bug 812562
Navigating away from, then back to a page should restore its CTP status.
browser/base/content/test/plugins/browser_bug818118.js
bug 818118
Test that CTP plugin and "unknown" plugin type work correctly on same page.
browser/base/content/test/plugins/browser_clearplugindata.js
Test clearing plugin data using Sanitizer.jsm
browser/base/content/test/plugins/browser_iterate_hidden_plugins.js
Bug 1318383
Test `plugins.navigator.hidden_ctp_plugin`, which hides CTP plugins from `navigator.plugins`.
browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
Test plugin crash detection and reporting
browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
Bug 1110887
Test both "plugin process crash notification" orders -- content proc before main proc and vice-versa.
browser/base/content/test/plugins/browser_plugin_reloading.js
Bug 1129040
Re-instantiating plugin (using `plugin.src = new_value`) should retain CTP approval.
browser/base/content/test/plugins/browser_plugin_framed_domain.js
Plugin CTP prompts should adopt top-level page's principal for instead of closest frame's principal.
browser/base/content/test/plugins/browser_pluginnotification.js
Tests many CTP interface behavior cases -- doorhangers, overlays, multiple plugin instances, CTP choices (always, allow, never)
browser/base/content/test/plugins/browser_private_clicktoplay.js
Make sure CTP interface works in private windows
browser/base/content/test/plugins/browser_subframe_access_hidden_plugins.js
Allow navigator.plugins to list plugin after CTP approval, even if it listed in `plugins.navigator.hidden_ctp_plugin`
Differential Revision: https://phabricator.services.mozilla.com/D95906
The browser currently only enables plugin behavior for Flash and our internal test plugins. This patch replaces support for those plugins with a simple fallback that shows a transparent region where the plugin would have been. It removes the file system search(es) for the plugin dynamic libraries and short-circuits the logic to determine if plugins should do something special -- all implementations now behave the same in the presence of plugin elements.
The new behavior is:
1. If the <object> or <embed> element lists a type of something other than "x-shockwave-flash" or "x-test" then the behavior is unchanged. This means that non-plugin types behave properly and unknown types (for example, typos) are also unaffected (they reduce to 0x0 elements).
2. If the <object> element has an HTML fallback in the DOM (see spec for <object> elements) then the fallback is always shown.
3. Otherwise, the element is shown as a transparent region with the size specified in attributes.
Differential Revision: https://phabricator.services.mozilla.com/D95902
Bug 1659438 introduced an exported function `GetDependentModulePaths` in firefox.exe
so that our sandboxBroker can easily access the shared section whose handle is owned
by firefox.exe.
This patch disallows `GetDependentModulePaths` to be called from someone other than
xul.dll in order to harden the attack to tamper our shared section. This cannot
prevent all possible attacks, but it's better than nothing.
Differential Revision: https://phabricator.services.mozilla.com/D97377
This uses the new deleteStorageAccessForClearingHistory API in Sanitizer to avoid
clearing all storage access API permissions and thus all cookies and site data when
clearing only history.
Differential Revision: https://phabricator.services.mozilla.com/D96641
This is done in preparation to using the module on Android in order to exclude
certain principals from getting their user interaction permissions cleared.
Differential Revision: https://phabricator.services.mozilla.com/D96638