Bug 1144231 - browser_polaris_prefs.js doesn't cleanup the preference at the end of the test. r=jmaher

This commit is contained in:
Gavin Sharp 2015-03-18 08:38:26 -04:00
parent 50711c0001
commit 1b19c1f6b0

View File

@ -41,6 +41,15 @@ add_task(function* test_changing_pref_changes_tracking() {
ok(true, "Skipping test, not Nightly")
return;
}
// Register a cleanup function for all the prefs affected by this entire test file.
registerCleanupFunction(function () {
Services.prefs.clearUserPref(POLARIS_ENABLED);
for (let pref of prefs) {
Services.prefs.clearUserPref(pref);
}
});
function* testPref(pref) {
Services.prefs.setBoolPref(POLARIS_ENABLED, true);
yield assertPref(pref, true);