Bug 1553778 - adjust test-attachment-reminder.js for toolbarbutton de-xbl. rs=bustage-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 24 May 2019 16:23:10 +0300
changeset 35684 8187a5f97b447dbc16ccbd525a81c0ec9e200df7
parent 35683 222e2a74d5dab0d18f6b46308923cbd70abdaa8e
child 35685 69f91833794216a472239e06add79a1ed914d8ff
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbustage-fix
bugs1553778
Bug 1553778 - adjust test-attachment-reminder.js for toolbarbutton de-xbl. rs=bustage-fix Remove last usage of get_menu_dropmarker.
mail/test/mozmill/attachment/test-attachment-menus.js
mail/test/mozmill/composition/test-attachment-reminder.js
mail/test/mozmill/shared-modules/test-window-helpers.js
--- a/mail/test/mozmill/attachment/test-attachment-menus.js
+++ b/mail/test/mozmill/attachment/test-attachment-menus.js
@@ -329,17 +329,16 @@ function check_toolbar_menu_states_multi
   assert_shown("attachmentSaveAllMultiple", true);
 
   if (expected.save === false) {
     assert_enabled("attachmentSaveAllMultiple", false);
   } else {
     assert_enabled("attachmentSaveAllMultiple", true);
     mc.click(new elementslib.Elem(mc.e("attachmentSaveAllMultiple").
       querySelector(".toolbarbutton-menubutton-dropmarker")));
-    
     wait_for_popup_to_open(mc.e("attachmentSaveAllMultipleMenu"));
 
     try {
       assert_enabled("button-openAllAttachments", expected.open);
       assert_enabled("button-saveAllAttachments", expected.save);
       assert_enabled("button-detachAllAttachments", expected.detach);
       assert_enabled("button-deleteAllAttachments", expected.delete_);
     } catch (e) {
--- a/mail/test/mozmill/composition/test-attachment-reminder.js
+++ b/mail/test/mozmill/composition/test-attachment-reminder.js
@@ -285,17 +285,19 @@ function test_no_send_now_sends() {
  * Click the manual reminder in the menu.
  *
  * @param aCwc            A compose window controller.
  * @param aExpectedState  A boolean specifying what is the expected state
  *                        of the reminder menuitem after the click.
  */
 function click_manual_reminder(aCwc, aExpectedState) {
   wait_for_window_focused(aCwc.window);
-  aCwc.click(new elementslib.Elem(aCwc.get_menu_dropmarker(aCwc.e("button-attach"))));
+  let button = aCwc.window.document.getElementById("button-attach");
+
+  aCwc.click(new elementslib.Elem(button.querySelector(".toolbarbutton-menubutton-dropmarker")));
   aCwc.click_menus_in_sequence(aCwc.e("button-attachPopup"),
                                [ {id: "button-attachPopup_remindLaterItem"} ]);
   wait_for_window_focused(aCwc.window);
   assert_manual_reminder_state(aCwc, aExpectedState);
 }
 
 /**
  * Bug 521128
--- a/mail/test/mozmill/shared-modules/test-window-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-window-helpers.js
@@ -1073,31 +1073,16 @@ var AugmentEverybodyWith = {
           this.keypress(new elib.Elem(curPopup), "VK_ESCAPE", {});
         utils.waitFor(() => curPopup.state == "closed",
                       () => ("Popup did not close! id=" + curPopup.id +
                              ", state=" + curPopup.state), 5000, 50);
       }
     },
 
     /**
-     * Get dropmarker arrow element from a toolbarbutton
-     *
-     * @param aNode  An element containing a dropmarker:
-     * a <toobalbuttton type="menu-button">. (Only usage left due to de-xbl).
-     */
-    get_menu_dropmarker(aNode) {
-      let children = aNode.ownerDocument.getAnonymousNodes(aNode);
-      for (let node of children) {
-        if (node.tagName == "xul:dropmarker")
-          return node;
-      }
-      return null;
-    },
-
-    /**
      * mark_action helper method that produces something that can be concat()ed
      *  onto a list being passed to mark_action in order to describe the focus
      *  state of the window.  For now this will be a variable-length list but
      *  could be changed to a single object in the future.
      */
     describeFocus() {
       let arr = [
         "in window:",