mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1346722 - Display permissions in alphabetical order. r=aswan
-Create a copy of the permissions array and sort it. -Change permissions order in test
This commit is contained in:
parent
96e4767e6c
commit
cb262894d3
@ -315,8 +315,10 @@ async function testInstallMethod(installFn, telemetryBase) {
|
||||
["webextPerms.hostDescription.wildcard", "wildcard.domain"],
|
||||
["webextPerms.hostDescription.oneSite", "singlehost.domain"],
|
||||
["webextPerms.description.nativeMessaging"],
|
||||
["webextPerms.description.tabs"],
|
||||
// The below permissions are deliberately in this order as permissions
|
||||
// are sorted alphabetically by the permission string to match AMO.
|
||||
["webextPerms.description.history"],
|
||||
["webextPerms.description.tabs"],
|
||||
]);
|
||||
} else if (filename == NO_PERMS_XPI) {
|
||||
checkNotification(panel, isDefaultIcon, []);
|
||||
|
@ -904,8 +904,11 @@ this.ExtensionData = class {
|
||||
result.msgs.push(bundle.formatStringFromName(permissionKey(NATIVE_MSG_PERM), [info.appName], 1));
|
||||
}
|
||||
|
||||
// Finally, show remaining permissions, in any order.
|
||||
for (let permission of perms.permissions) {
|
||||
// Finally, show remaining permissions, in the same order as AMO.
|
||||
// The permissions are sorted alphabetically by the permission
|
||||
// string to match AMO.
|
||||
let permissionsCopy = perms.permissions.slice(0);
|
||||
for (let permission of permissionsCopy.sort()) {
|
||||
// Handled above
|
||||
if (permission == "nativeMessaging") {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user