Bug 822535 User-Oriented Labels in Data Manager for "sts/use" and "sts/subd" r=KaiRo.
This commit is contained in:
Родитель
86bd3c0eec
Коммит
ff504d6ab8
|
@ -1228,7 +1228,7 @@ var gPerms = {
|
|||
this.addType.removeAllItems(); // Make sure list is clean.
|
||||
let permTypes = ["allowXULXBL", "cookie", "geo", "image", "install",
|
||||
"object", "offline-app", "password", "plugins",
|
||||
"popup", "script", "stylesheet"];
|
||||
"popup", "script", "sts/use", "sts/subd", "stylesheet"];
|
||||
for (let i = 0; i < permTypes.length; i++) {
|
||||
let typeDesc = permTypes[i];
|
||||
try {
|
||||
|
|
|
@ -328,12 +328,16 @@ function test_permissions_panel(aWin) {
|
|||
"install", Services.perms.ALLOW_ACTION);
|
||||
Services.perms.add(Services.io.newURI("http://popup.getpersonas.com/", null, null),
|
||||
"popup", Services.perms.ALLOW_ACTION);
|
||||
Services.perms.add(Services.io.newURI("http://stsuse.getpersonas.com/", null, null),
|
||||
"sts/use", Services.perms.ALLOW_ACTION);
|
||||
Services.perms.add(Services.io.newURI("http://stssubd.getpersonas.com/", null, null),
|
||||
"sts/subd", Services.perms.ALLOW_ACTION);
|
||||
Services.perms.add(Services.io.newURI("http://test.getpersonas.com/", null, null),
|
||||
"test", Services.perms.DENY_ACTION);
|
||||
Services.perms.add(Services.io.newURI("http://xul.getpersonas.com/", null, null),
|
||||
"allowXULXBL", Services.perms.ALLOW_ACTION);
|
||||
Services.logins.setLoginSavingEnabled("password.getpersonas.com", false);
|
||||
is(aWin.gPerms.list.children.length, 10,
|
||||
is(aWin.gPerms.list.children.length, 12,
|
||||
"The correct number of permissions is displayed in the list");
|
||||
for (let i = 1; i < aWin.gPerms.list.children.length; i++) {
|
||||
let perm = aWin.gPerms.list.children[i];
|
||||
|
@ -401,6 +405,24 @@ function test_permissions_panel(aWin) {
|
|||
is(perm.capability, 1,
|
||||
"Set back to correct default");
|
||||
break;
|
||||
case "sts/use":
|
||||
is(perm.getAttribute("label"), "Use Strict Transport Security",
|
||||
"Correct label for type: " + perm.type);
|
||||
is(perm.capability, 1,
|
||||
"Correct capability for: " + perm.host);
|
||||
perm.useDefault(true);
|
||||
is(perm.capability, 0,
|
||||
"Set back to correct default");
|
||||
break;
|
||||
case "sts/subd":
|
||||
is(perm.getAttribute("label"), "Apply Strict Transport Security to subdomains",
|
||||
"Correct label for type: " + perm.type);
|
||||
is(perm.capability, 1,
|
||||
"Correct capability for: " + perm.host);
|
||||
perm.useDefault(true);
|
||||
is(perm.capability, 0,
|
||||
"Set back to correct default");
|
||||
break;
|
||||
default:
|
||||
is(perm.getAttribute("label"), perm.type,
|
||||
"Correct default label for type: " + perm.type);
|
||||
|
|
|
@ -27,6 +27,8 @@ perm.plugins.label=Activate Plugins
|
|||
perm.popup.label=Open Popup Windows
|
||||
perm.script.label=Run Scripts
|
||||
perm.stylesheet.label=Load Stylesheets
|
||||
perm.sts/use.label=Use Strict Transport Security
|
||||
perm.sts/subd.label=Apply Strict Transport Security to subdomains
|
||||
|
||||
perm.type.default=Select a type
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче