bug 1483598 - Match system and user extension add/remove page action strings r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D5069

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Striemer 2018-09-05 19:17:40 +00:00
Родитель 84279844a7
Коммит 47e85ff68e
4 изменённых файлов: 25 добавлений и 27 удалений

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

@ -530,10 +530,10 @@ xmlns="http://www.w3.org/1999/xhtml"
label="&pageAction.removeFromUrlbar.label;"
oncommand="BrowserPageActions.togglePinningForContextAction();"/>
<menuitem class="pageActionContextMenuItem extensionUnpinned"
label="&pageAction.allowInUrlbar.label;"
label="&pageAction.addToUrlbar.label;"
oncommand="BrowserPageActions.togglePinningForContextAction();"/>
<menuitem class="pageActionContextMenuItem extensionPinned"
label="&pageAction.disallowInUrlbar.label;"
label="&pageAction.removeFromUrlbar.label;"
oncommand="BrowserPageActions.togglePinningForContextAction();"/>
<menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
<menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"

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

@ -146,7 +146,7 @@ add_task(async function test_hiddenPageActionContextMenu() {
is(menuItems.length, 3, "Correct number of children");
const [dontShowItem, separator, manageItem] = menuItems;
is(dontShowItem.label, "Don\u2019t Show in Address Bar", "Correct first child");
is(dontShowItem.label, "Remove from Address Bar", "Correct first child");
is(separator.tagName, "menuseparator", "Correct second child");
is(manageItem.label, "Manage Extension\u2026", "Correct third child");

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

@ -1084,8 +1084,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY pageActionButton.tooltip "Page actions">
<!ENTITY pageAction.addToUrlbar.label "Add to Address Bar">
<!ENTITY pageAction.removeFromUrlbar.label "Remove from Address Bar">
<!ENTITY pageAction.allowInUrlbar.label "Show in Address Bar">
<!ENTITY pageAction.disallowInUrlbar.label "Dont Show in Address Bar">
<!ENTITY pageAction.manageExtension.label "Manage Extension…">
<!ENTITY sendToDevice.syncNotReady.label "Syncing Devices…">

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

@ -1275,13 +1275,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "don't show" item and the "manage" item.
// Click the "don't show" item.
// The context menu should show the "remove" item and the "manage" item.
// Click the "remove" item.
let menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Don\u2019t Show in Address Bar",
"Context menu is in the 'don't show' state");
Assert.equal(menuItems[0].label, "Remove from Address Bar",
"Context menu is in the 'remove' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",
@ -1304,13 +1304,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "show" item and the "manage" item. Click
// the "show" item.
// The context menu should show the "add" item and the "manage" item. Click
// the "add" item.
menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Show in Address Bar",
"Context menu is in the 'show' state");
Assert.equal(menuItems[0].label, "Add to Address Bar",
"Context menu is in the 'add' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",
@ -1333,13 +1333,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "don't show" item and the "manage" item.
// The context menu should show the "remove" item and the "manage" item.
// Click the "manage" item. about:addons should open.
menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Don\u2019t Show in Address Bar",
"Context menu is in the 'don't show' state");
Assert.equal(menuItems[0].label, "Remove from Address Bar",
"Context menu is in the 'remove' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",
@ -1361,13 +1361,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "don't show" item and the "manage" item.
// Click the "don't show" item.
// The context menu should show the "remove" item and the "manage" item.
// Click the "remove" item.
menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Don\u2019t Show in Address Bar",
"Context menu is in the 'don't show' state");
Assert.equal(menuItems[0].label, "Remove from Address Bar",
"Context menu is in the 'remove' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",
@ -1390,13 +1390,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "show" item and the "manage" item. Click
// the "show" item.
// The context menu should show the "add" item and the "manage" item. Click
// the "add" item.
menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Show in Address Bar",
"Context menu is in the 'show' state");
Assert.equal(menuItems[0].label, "Add to Address Bar",
"Context menu is in the 'add' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",
@ -1419,13 +1419,13 @@ add_task(async function contextMenu() {
});
await contextMenuPromise;
// The context menu should show the "don't show" item and the "manage" item.
// The context menu should show the "remove" item and the "manage" item.
// Click the "manage" item. about:addons should open.
menuItems = collectContextMenuItems();
Assert.equal(menuItems.length, 3,
"Context menu has 3 children");
Assert.equal(menuItems[0].label, "Don\u2019t Show in Address Bar",
"Context menu is in the 'don't show' state");
Assert.equal(menuItems[0].label, "Remove from Address Bar",
"Context menu is in the 'remove' state");
Assert.equal(menuItems[1].localName, "menuseparator",
"menuseparator is present");
Assert.equal(menuItems[2].label, "Manage Extension\u2026",