Bug 1433870 - Policy: Tracking protection. test follow-up. r=me

Unlock the prefs at the end of the test so that it doesn't fail when it runs twice in a row (e.g., on test-verify)
This commit is contained in:
Felipe Gomes 2018-03-17 00:32:44 -03:00
parent 4fbe59c404
commit 552d9ddb70

View File

@ -17,7 +17,7 @@ add_task(async function test_policy_enable_tracking_protection1() {
is(Services.prefs.prefIsLocked("privacy.trackingprotection.enabled"), false, "Tracking protection pref is not locked.");
});
add_task(async function test_policy_enable_tracking_protection1() {
add_task(async function test_policy_enable_tracking_protection_locked() {
await setupPolicyEngineWithJson({
"policies": {
"EnableTrackingProtection": {
@ -30,4 +30,7 @@ add_task(async function test_policy_enable_tracking_protection1() {
is(Services.prefs.getBoolPref("privacy.trackingprotection.enabled"), false, "Tracking protection has been disabled by default.");
is(Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled"), false, "Tracking protection has been disabled by default in private browsing mode.");
is(Services.prefs.prefIsLocked("privacy.trackingprotection.enabled"), true, "Tracking protection pref is locked.");
Services.prefs.unlockPref("privacy.trackingprotection.enabled");
Services.prefs.unlockPref("privacy.trackingprotection.pbmode.enabled");
});