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

NEW
Unassigned

Status

()

Toolkit
WebExtensions: General
P3
normal
24 days ago
21 days ago

People

(Reporter: bsilverberg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

24 days ago
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.
(Reporter)

Updated

24 days ago
Blocks: 1412295
(Reporter)

Updated

24 days ago
Flags: needinfo?(mozilla)
(Reporter)

Comment 1

21 days ago
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
You need to log in before you can comment on or make changes to this bug.