зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1280775 - null check in removePermission to prevent crash: add test. r=mystor
MozReview-Commit-ID: E94VCl0um3T --HG-- extra : rebase_source : f7a94ab729a9d2e09731becde3afb75a19b43cbb
This commit is contained in:
Родитель
24761c4c2a
Коммит
1ea3f17522
|
@ -105,4 +105,15 @@ function run_test() {
|
|||
// test removeAll()
|
||||
pm.removeAll();
|
||||
do_check_eq(pm.enumerator.hasMoreElements(), false);
|
||||
|
||||
uri = ioService.newURI("https://www.example.com", null, null);
|
||||
pm.add(uri, "offline-app", pm.ALLOW_ACTION);
|
||||
principal = secMan.createCodebasePrincipalFromOrigin("https://www.example.com");
|
||||
// Remove existing entry.
|
||||
perm = pm.getPermissionObject(principal, "offline-app", true);
|
||||
pm.removePermission(perm);
|
||||
// Try to remove already deleted entry.
|
||||
perm = pm.getPermissionObject(principal, "offline-app", true);
|
||||
pm.removePermission(perm);
|
||||
do_check_eq(pm.enumerator.hasMoreElements(), false);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче