Bug 1557979 - Follow-up: Fix 'page menu' and re-enable check. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Sun, 09 Jun 2019 22:47:52 +0200
changeset 35813 5fa5def104b3a0f96b553e47f6d0defde3f96cda
parent 35812 0630127824af061c74cb5792477acf666f8c6cd6
child 35814 a7bf84ab2a7585a118fa6d66fa6f79e1618b7172
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbustage-fix
bugs1557979
Bug 1557979 - Follow-up: Fix 'page menu' and re-enable check. rs=bustage-fix
mail/base/content/nsContextMenu.js
mail/test/mozmill/content-tabs/test-content-tab.js
--- a/mail/base/content/nsContextMenu.js
+++ b/mail/base/content/nsContextMenu.js
@@ -78,16 +78,17 @@ nsContextMenu.prototype = {
     }
 
     this.isContentSelected = this.isContentSelection();
 
     this.hasPageMenu = false;
     if (!aIsShift) {
       let menuObject = PageMenuParent.maybeBuild(this.target);
       PageMenuParent.addToPopup(menuObject, null, aPopup);
+      this.hasPageMenu = true;
 
       let subject = {
         menu: aPopup,
         tab: document.getElementById("tabmail") ?
              document.getElementById("tabmail").currentTabInfo : undefined,
         isContentSelected: this.isContentSelected,
         inFrame: this.inFrame,
         isTextSelected: this.isTextSelected,
--- a/mail/test/mozmill/content-tabs/test-content-tab.js
+++ b/mail/test/mozmill/content-tabs/test-content-tab.js
@@ -105,17 +105,17 @@ function test_content_tab_context_menu()
   let heading = w.document.querySelector("h1");
   let mailContext = mc.e("mailContext");
 
   // Make sure the page's menu items are added on right-click.
   EventUtils.synthesizeMouse(heading, 5, 5, { type: "contextmenu", button: 2 },
                              w);
   wait_for_popup_to_open(mailContext);
   assert_equals(mailContext.firstChild.label, "Click me!");
-  // See bug 1557979: assert_element_visible("page-menu-separator");
+  assert_element_visible("page-menu-separator");
   close_popup(mc, new elementslib.Elem(mailContext));
 
   // Make sure the page's menu items are *not* added on shift-right-click.
   EventUtils.synthesizeMouse(heading, 5, 5, { type: "contextmenu", button: 2,
                                               shiftKey: true }, w);
   wait_for_popup_to_open(mailContext);
   assert_not_equals(mailContext.firstChild.label, "Click me!");
   assert_element_not_visible("page-menu-separator");