bug 1483598 - Match system and user extension add/remove page action strings r=mixedpuppy
authorMark Striemer <mstriemer@mozilla.com>
Wed, 05 Sep 2018 19:17:40 +0000
changeset 435008 3b5f59ae29baf418ced93040e76732c9cb4473a7
parent 435007 1eef890debe96a14d09676c6208164160e94c96a
child 435009 5cd83e5b3ea002480c8a6a53f1706cff4808f8a9
push id107530
push userapavel@mozilla.com
push dateThu, 06 Sep 2018 04:44:27 +0000
treeherdermozilla-inbound@5f5d7a3ce332 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1483598
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1483598 - Match system and user extension add/remove page action strings r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D5069
browser/base/content/browser.xul
browser/components/extensions/test/browser/browser_ext_menus.js
browser/locales/en-US/chrome/browser/browser.dtd
browser/modules/test/browser/browser_PageActions.js
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -525,20 +525,20 @@ xmlns="http://www.w3.org/1999/xhtml"
                onpopupshowing="BrowserPageActions.onContextMenuShowing(event, this);">
       <menuitem class="pageActionContextMenuItem builtInUnpinned"
                 label="&pageAction.addToUrlbar.label;"
                 oncommand="BrowserPageActions.togglePinningForContextAction();"/>
       <menuitem class="pageActionContextMenuItem builtInPinned"
                 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"
                 label="&pageAction.manageExtension.label;"
                 oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
     </menupopup>
 
 #include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
--- a/browser/components/extensions/test/browser/browser_ext_menus.js
+++ b/browser/components/extensions/test/browser/browser_ext_menus.js
@@ -141,17 +141,17 @@ add_task(async function test_hiddenPageA
   const menu = await openContextMenuInPageActionPanel(extension);
   const menuItems = Array.filter(menu.children, node => {
     return window.getComputedStyle(node).visibility == "visible";
   });
 
   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");
 
   await closeChromeContextMenu(menu.id);
   await closeChromeContextMenu(BrowserPageActions.panelNode.id);
 
   BrowserTestUtils.removeTab(tab);
   await extension.unload();
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -1079,18 +1079,16 @@ you can use these alternative items. Oth
 <!ENTITY tabHideControlled.keepButton.label "Keep Tabs Hidden">
 <!ENTITY tabHideControlled.keepButton.accesskey "K">
 <!ENTITY tabHideControlled.disableButton.label "Disable Extension">
 <!ENTITY tabHideControlled.disableButton.accesskey "D">
 
 <!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 "Don’t Show in Address Bar">
 <!ENTITY pageAction.manageExtension.label "Manage Extension…">
 
 <!ENTITY sendToDevice.syncNotReady.label "Syncing Devices…">
 
 <!ENTITY pageAction.shareUrl.label "Share">
 <!ENTITY pageAction.shareMore.label "More…">
 
 <!ENTITY libraryButton.tooltip "View history, saved bookmarks, and more">
--- a/browser/modules/test/browser/browser_PageActions.js
+++ b/browser/modules/test/browser/browser_PageActions.js
@@ -1270,23 +1270,23 @@ add_task(async function contextMenu() {
   let panelButton = BrowserPageActions.panelButtonNodeForActionID(action.id);
   let contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(panelButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(menuItems[0], {});
   await contextMenuPromise;
 
@@ -1299,23 +1299,23 @@ add_task(async function contextMenu() {
   // panel should still be open.)
   contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(panelButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(menuItems[0], {});
   await contextMenuPromise;
 
@@ -1328,23 +1328,23 @@ add_task(async function contextMenu() {
   // panel should still be open.)
   contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(panelButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   let aboutAddonsPromise =
     BrowserTestUtils.waitForNewTab(gBrowser, "about:addons");
   EventUtils.synthesizeMouseAtCenter(menuItems[2], {});
@@ -1356,23 +1356,23 @@ add_task(async function contextMenu() {
   let urlbarButton = BrowserPageActions.urlbarButtonNodeForActionID(action.id);
   contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(urlbarButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(menuItems[0], {});
   await contextMenuPromise;
 
@@ -1385,23 +1385,23 @@ add_task(async function contextMenu() {
   await promiseOpenPageActionPanel();
   contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(panelButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(menuItems[0], {});
   await contextMenuPromise;
 
@@ -1414,23 +1414,23 @@ add_task(async function contextMenu() {
   urlbarButton = BrowserPageActions.urlbarButtonNodeForActionID(action.id);
   contextMenuPromise = promisePanelShown("pageActionContextMenu");
   EventUtils.synthesizeMouseAtCenter(urlbarButton, {
     type: "contextmenu",
     button: 2,
   });
   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",
                "'Manage' item is present");
   contextMenuPromise = promisePanelHidden("pageActionContextMenu");
   aboutAddonsPromise =
     BrowserTestUtils.waitForNewTab(gBrowser, "about:addons");
   EventUtils.synthesizeMouseAtCenter(menuItems[2], {});