Bug 1033453 - Fix the composed permission check on app updates. r=fabrice

This commit is contained in:
Antonio M. Amaya 2014-07-08 05:45:00 -04:00
Родитель 569db4f657
Коммит 67635a6fe9
4 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -167,7 +167,7 @@ this.PermissionsInstaller = {
// If it's not a system update, then we should keep the prompt
// permissions that have been granted or denied previously.
permValue =
PermissionSettingsModule.getPermission(permName,
PermissionSettingsModule.getPermission(expandedPermNames[idx],
aApp.manifestURL,
aApp.origin,
false);

Просмотреть файл

@ -358,6 +358,15 @@ this.PermissionsTable = { geolocation: {
app: DENY_ACTION,
privileged: PROMPT_ACTION,
certified: PROMPT_ACTION
},
// This permission doesn't actually grant access to
// anything. It exists only to check the correctness
// of web prompt composed permissions in tests.
"test-permission": {
app: PROMPT_ACTION,
privileged: PROMPT_ACTION,
certified: ALLOW_ACTION,
access: ["read", "write", "create"]
}
};

Просмотреть файл

@ -8,6 +8,7 @@
"geolocation": {},
"audio-capture": {},
"video-capture": {},
"test-permission": {"access": "readonly"},
"downloads": {}
},
"launch_path": "tests/dom/apps/tests/file_packaged_app.sjs",

Просмотреть файл

@ -95,11 +95,13 @@ var initialPermissionState = {
"geolocation": "prompt",
"audio-capture": "prompt",
"video-capture": "prompt",
"test-permission-read": "prompt",
"downloads": "deny"
}
var permissionsToSet = {
"geolocation": "allow",
"test-permission-read": "allow",
"audio-capture": "deny"
}
@ -107,6 +109,7 @@ var permissionsToCheck = {
"geolocation": "allow",
"audio-capture": "deny",
"video-capture": "prompt",
"test-permission-read": "allow",
"downloads": "deny"
}