Bug 1563661 - Stop looking across document boundaries in failing Mozmill test; r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 05 Jul 2019 17:52:50 +1200
changeset 36039 83dd4afa641fe1128d23b004fc59d97d2829f974
parent 36038 63616633fa865cdf7ce749bc003a0e01f0eb0f31
child 36040 8da790400467339fff4f0954284c9ac69b98c7e8
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1563661
Bug 1563661 - Stop looking across document boundaries in failing Mozmill test; r=jorgk
mail/test/mozmill/content-policy/test-compose-mailto.js
mail/test/mozmill/shared-modules/test-compose-helpers.js
--- a/mail/test/mozmill/content-policy/test-compose-mailto.js
+++ b/mail/test/mozmill/content-policy/test-compose-mailto.js
@@ -46,17 +46,18 @@ function setupModule(module) {
 }
 
 function test_openComposeFromMailToLink() {
   // Open a content tab with the mailto link in it.
     // To open a tab we're going to have to cheat and use tabmail so we can load
   // in the data of what we want.
   gPreCount = mc.tabmail.tabContainer.allTabs.length;
   gNewTab = open_content_tab_with_url(url + "mailtolink.html");
-  gComposeWin = composeHelper.open_compose_with_element_click("mailtolink");
+  gComposeWin = composeHelper.open_compose_with_element_click(
+    content_tab_eid(gNewTab, "mailtolink"));
 }
 
 function test_checkInsertImage() {
   // First focus on the editor element
   gComposeWin.e("content-frame").focus();
 
   // Now open the image window
   windowHelper.plan_for_modal_dialog("imageDlg",
--- a/mail/test/mozmill/shared-modules/test-compose-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-compose-helpers.js
@@ -173,28 +173,28 @@ function open_compose_with_forward(aCont
 
   return wait_for_compose_window();
 }
 
 /**
  * Opens the compose window by clicking the specified element and waits for
  * the compose window to load.
  *
- * @param aElement    the name of the element that should be clicked.
+ * @param aElement    the element that should be clicked.
  * @param aController the controller whose window is to be closed.
  *
  * @return The loaded window of type "msgcompose" wrapped in a MozmillController
  *         that is augmented using augment_controller.
  */
 function open_compose_with_element_click(aElement, aController) {
   if (aController === undefined)
     aController = mc;
 
   windowHelper.plan_for_new_window("msgcompose");
-  aController.click(new elib.ID(mc.window.document, aElement));
+  aController.click(aElement);
 
   return wait_for_compose_window();
 }
 
 
 /**
  * Open draft editing by clicking the "Edit" on the draft notification bar
  * of the selected message.