Closed Bug 570152 Opened 14 years ago Closed 14 years ago

engine.js tests should completely reset preferences

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: philikon, Assigned: philikon)

References

Details

Attachments

(1 file)

Tests need to tear down persistent changes to the environment such as preferences so that the next test sees a pristine environment. Right now the engine.js tests reset individual preferences they touch. This is brittle as a lot of object attributes correspond to preferences and various code paths may change those attributes, now or in the future. These lists may also not be complete and just work by accident, IOW depend on the execution order of the tests. It would be much better if those tests reset *all* preferences upon tear down.
Assignee: nobody → philipp
Depends on: 557588
Attached patch v1Splinter Review
Replace individual calls to Svc.Prefs.reset(PREFNAME) with one call to Svc.Prefs.resetBranch("") to reset all preferences to their default values.
Attachment #449275 - Flags: review?(mconnor)
Attachment #449275 - Flags: review?(mconnor) → review+
http://hg.mozilla.org/services/fx-sync/rev/b6af4cf3615a
Switch to resetBranch("") instead of resetting individual prefs.
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: