mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1116765 - Fix browser_noperm.js test to consider indexedDB an always allowed permission. r=myk
This commit is contained in:
parent
c43123688a
commit
c05ba08db8
@ -18,13 +18,19 @@ function test() {
|
||||
let principal = document.getElementById("content").contentDocument.defaultView.document.nodePrincipal;
|
||||
is(DOMApplicationRegistry.getAppLocalIdByManifestURL(app.manifestURL), principal.appId, "Principal app ID correct");
|
||||
|
||||
let alwaysAllowed = ["indexedDB"]
|
||||
|
||||
// Check if all the permissions of the app are unknown.
|
||||
for (let permName of AllPossiblePermissions) {
|
||||
// Get the value for the permission.
|
||||
let permValue = Services.perms.testExactPermissionFromPrincipal(principal, permName);
|
||||
|
||||
if (alwaysAllowed.includes(permName)) {
|
||||
is(permValue, Ci.nsIPermissionManager.ALLOW_ACTION, "Permission " + permName + " allowed.");
|
||||
} else {
|
||||
is(permValue, Ci.nsIPermissionManager.UNKNOWN_ACTION, "Permission " + permName + " unknown.");
|
||||
}
|
||||
}
|
||||
|
||||
finish();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user