Closed Bug 1412291 Opened 7 years ago Closed 6 years ago

Add a test to confirm that default search cannot be set to a new engine via sideloading

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1418084

People

(Reporter: bsilverberg, Unassigned)

Details

When an extension which is meant to override the default search engine is sideloaded by adding its xpi file to the profile folder, it does not override the default search engine.

This seems to be because the extension is not sent an event with the startupReason of "ADDON_INSTALL", and that's the only case in which the setting for the default search is written to the ExtensionSettingsStore (ESS).

This also means that if the extension is later disabled and re-enabled, it still won't update the default search engine, because the ESS doesn't know that needs to be done.

I recently looked at a similar case where an extension was being sideloaded via the Windows registry and that did not suffer from this same problem, which seems odd, but I suppose those two methods of sideloading behave differently.
Blocks: 1412295
Flags: needinfo?(mozilla)
Repurposing this bug to be about confirming the behaviour that exists, but seems to perhaps have been unintentional.

If an extension wants to override the default search engine it can do so by setting chrome_settings_overrides.search_provider.is_default = true in its manifest file. If it is setting the default search engine to one of Firefox's built-in search engines, then that should succeed even if the extension is sideloaded. If it is setting the default search engine to a new search engine, however, it should not succeed in doing so if the extension is sideloaded.

A test should be added to verify this behaviour to protect against regressions.
No longer blocks: 1412295
Flags: needinfo?(mozilla)
Priority: P2 → P3
Summary: Sideloading an extension that overrides search does not override search → Add a test to confirm that default search cannot be set to a new engine via sideloading
This should just be a part of writing tests for search engines in extensions.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.