Bug 1428425 - Clean up browser_permissions_dialog.js. r=johannh

MozReview-Commit-ID: 3cBMSVOmgVi

--HG--
extra : rebase_source : 2e1c45582ce04cfd4afb01813be5908bff13ee91
This commit is contained in:
Prathiksha 2018-01-06 15:42:07 +05:30
parent 518d2ef5a8
commit ba7f1e146f

View File

@ -309,8 +309,9 @@ add_task(async function onPermissionDisable() {
checkbox = doc.getElementById("permissionsDisableCheckbox");
Assert.equal(checkbox.checked, true);
// Close the dialog.
// Close the dialog and clean up.
doc.getElementById("cancel").click();
Services.prefs.setIntPref("permissions.default.desktop-notification", SitePermissions.UNKNOWN);
});
add_task(async function checkDefaultPermissionState() {
@ -334,6 +335,9 @@ add_task(async function checkDefaultPermissionState() {
// Check if the default permission state is retained (and not automatically set to SitePermissions.UNKNOWN).
let state = Services.prefs.getIntPref("permissions.default.desktop-notification");
Assert.equal(state, SitePermissions.ALLOW);
// Clean up.
Services.prefs.setIntPref("permissions.default.desktop-notification", SitePermissions.UNKNOWN);
});
add_task(async function removeTab() {