Closed Bug 1982431 Opened 1 year ago Closed 9 months ago

extensions.webextensions.warnings-as-errors is reported as changed - should be using ExtensionTestUtils.failOnSchemaWarnings() instead

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED
147 Branch

People

(Reporter: mkmelin, Assigned: john)

References

Details

Attachments

(1 file)

Per bug 1977567 comment 6:
Here is an example of a bug revealed by the change: The extensions.webextensions.warnings-as-errors is reported as changed. This pref is set by default in tests to enable stricter extension schema validation checks (e.g. use of deprecated or misspelled properties in manifest.json). If the pref were to be turned off, then this stricter validation would be disabled for all unrelated tests that follow.

There are three files listing these, at https://bug1977567.bmoattachments.org/attachment.cgi?id=9500923#pref-extensions.webextensions.warnings-as-errors . These manually set the preferences and clear them afterwards (e.g. browser_ext_commands_execute_browser_action.js). In this specific case, ExtensionTestUtils.failOnSchemaWarnings(false); should be used instead (examples of uses in m-c: https://searchfox.org/mozilla-central/search?q=ExtensionTestUtils.failOnSchemaWarnings&path=browser%2F&case=false&regexp=false ). This advice applies to all of the tests that manually touch the pref, at https://searchfox.org/comm-central/search?q=extensions.webextensions.warnings-as-errors&path=mail%2F&case=true&regexp=false

Thanks Magnus for reporting this!

This patch also restores the the extensions.webextensions.uuids preference.

Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/40773461c8e2
Use ExtensionTestUtils.failOnSchemaWarnings() instead of changing the prefs directly. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: