зеркало из https://github.com/mozilla/gecko-dev.git
Bug 574460 - Fix handling of permission deletion notifications in preference dialogs. Original patch by Mehdi Mulani. r=unfocused
This commit is contained in:
Родитель
72190bd76a
Коммит
22620a2927
|
@ -236,10 +236,17 @@ var gPermissionManager = {
|
||||||
}
|
}
|
||||||
this._tree.treeBoxObject.invalidate();
|
this._tree.treeBoxObject.invalidate();
|
||||||
}
|
}
|
||||||
// No UI other than this window causes this method to be sent a "deleted"
|
else if (aData == "deleted") {
|
||||||
// notification, so we don't need to implement it since Delete is handled
|
for (var i = 0; i < this._permissions.length; i++) {
|
||||||
// directly by the Permission Removal handlers. If that ever changes, those
|
if (this._permissions[i].host == permission.host) {
|
||||||
// implementations will have to move into here.
|
this._permissions.splice(i, 1);
|
||||||
|
this._view._rowCount--;
|
||||||
|
this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, -1);
|
||||||
|
this._tree.treeBoxObject.invalidate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,17 @@ function windowLoad(event, win, dialog) {
|
||||||
pm.remove("test.com", "popup");
|
pm.remove("test.com", "popup");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: function() {
|
||||||
|
url.value = "test.com";
|
||||||
|
btnAllow.doCommand();
|
||||||
|
pm.remove("test.com", "cookie");
|
||||||
|
is(tree.view.rowCount, 0, "display should update when cookie permission is deleted");
|
||||||
|
},
|
||||||
|
observances: [{ type: "cookie", host: "test.com", data: "added",
|
||||||
|
capability: allow },
|
||||||
|
{ type: "cookie", host: "test.com", data: "deleted" }]
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
let permObserver = {
|
let permObserver = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче