Closed Bug 1982429 Opened 1 year ago Closed 5 days ago

use SpecialPowers.pushPrefEnv instead of Services.prefs for some mochitests

Categories

(Thunderbird :: General, defect)

defect
Points:
1

Tracking

(Not tracked)

RESOLVED FIXED
156 Branch

People

(Reporter: mkmelin, Assigned: tobyp)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Per bug 1977567 comment 6:
"In general, in browser tests and mochitests you should use SpecialPowers.pushPrefEnv instead of using Services.prefs API, because the test-only SpecialPowers.pushPrefEnv API automatically cleans up preferences at the end of the test, even if you forget (or intentionally omit) the countering SpecialPowers.popPrefEnv call"

Assignee: nobody → toby
Status: NEW → ASSIGNED
Points: --- → 1
Target Milestone: --- → 156 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3c841d450ab2
Use SpecialPowers.pushPrefEnv in mochitests. r=arschmitz

Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED

It seems there's a whole lot more of these left: https://searchfox.org/comm-central/search?q=Services.prefs.set&path=browser_&case=false&regexp=false - both mail and calendar

Flags: needinfo?(toby)

wow, ok thanks

Status: RESOLVED → REOPENED
Flags: needinfo?(toby)
Keywords: leave-open
Resolution: FIXED → ---

Sorry, this is going to span target milestones but is only test changes. Hope that's ok

No it's not. Making another bug

Status: REOPENED → RESOLVED
Closed: 6 days ago5 days ago
Resolution: --- → FIXED
Summary: use SpecialPowers.pushPrefEnv instead of Services.prefs for mochitests → use SpecialPowers.pushPrefEnv instead of Services.prefs for some mochitests
Blocks: 2066871

Comment on attachment 9631162 [details]
Bug 1982429 - Use SpecialPowers.pushPrefEnv in calendar browser tests. r=#thunderbird-reviewers

Revision D321569 was moved to bug 2066871. Setting attachment 9631162 [details] to obsolete.

Attachment #9631162 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: