Open Bug 1977779 Opened 4 months ago Updated 1 month ago

Only reset selected preferences at the end of devtools tests

Categories

(DevTools :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

Now that Bug 1975980 has landed, we shouldn't have test-verify breakage due to missing preferences, so we can relax the cleanup logic added in Bug 1974700.

The initial approach was to reset all preferences which were touched by the test. It could be worth having an explicit list of preferences to reset instead? The goal is to handle all preferences which are indirectly touched by a test (and therefore cannot benefit from using pushPrefEnv or similar).

Note that when implementing Bug 1974700 I had issues with preferences which should not be cleared because they already had a user value before the test started. This is why I am currently recording them in alreadySetPreferences. For devtools it seems that none of those prefs were triggering issues with compare-preferences, but if it's ever the case we would need to record and restore the value. At this point, it seems it would be better to have a feature in the test harness to silently restore such preferences rather than duplicating the logic in every test suite.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.