Backed out changeset 42a96b98eeec (bug 925871) for Mozmill failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 26 Nov 2013 15:20:33 -0500
changeset 16933 6ec8a0de056778f0cc148c8a1fd17bfe5d81b5b3
parent 16932 115b4d5ecf6b806cedf2a1f5e63d5c3c05e67547
child 16934 b5b27527f40b9a13251f19f5df2f9ae7e4f59707
push id1074
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:47:23 +0000
treeherdercomm-beta@6b791b5369ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs925871
backs out42a96b98eeeccbb60e6b7311bcd31ff01ec2c33b
Backed out changeset 42a96b98eeec (bug 925871) for Mozmill failures.
mail/test/mozmill/composition/test-send-button.js
mail/test/mozmill/shared-modules/test-account-manager-helpers.js
mail/test/mozmill/shared-modules/test-folder-display-helpers.js
--- a/mail/test/mozmill/composition/test-send-button.js
+++ b/mail/test/mozmill/composition/test-send-button.js
@@ -156,19 +156,17 @@ function test_send_enabled_address_conta
   check_send_commands_state(cwc, false);
 
   // Open Contacts sidebar and use our contact.
   cwc.window.toggleAddressPicker();
 
   let sidebar = cwc.e("sidebar");
   wait_for_frame_load(sidebar,
     "chrome://messenger/content/addressbook/abContactsPanel.xul");
-
-  let abTree = sidebar.contentDocument.getElementById("abResultsTree");
-  click_tree_row(abTree, 0, cwc);
-
+  let abView = sidebar.contentDocument.getElementById("abResultsTree").treeBoxObject.view;
+  abView.selection.select(0);
   sidebar.contentDocument.getElementById("ccButton").click();
 
   // The recipient is filled in, Send must be enabled.
   check_send_commands_state(cwc, true);
 
   close_compose_window(cwc);
 }
--- a/mail/test/mozmill/shared-modules/test-account-manager-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-account-manager-helpers.js
@@ -69,17 +69,33 @@ function open_advanced_settings_from_acc
  * @param rowIndex the row to click
  */
 function click_account_tree_row(controller, rowIndex) {
   utils.waitFor(function () controller.window.currentAccount != null,
                 "Timeout waiting for currentAccount to become non-null");
 
   let tree = controller.window.document.getElementById("accounttree");
 
-  fdh.click_tree_row(tree, rowIndex, controller);
+  if (rowIndex < 0 || rowIndex >= tree.view.rowCount)
+    throw new Error("Row " + rowIndex + " does not exist in the account tree!");
+
+  let selection = tree.view.selection;
+  selection.select(rowIndex);
+  tree.treeBoxObject.ensureRowIsVisible(rowIndex);
+
+  // get cell coordinates
+  var x = {}, y = {}, width = {}, height = {};
+  var column = tree.columns[0];
+  tree.treeBoxObject.getCoordsForCellItem(rowIndex, column, "text",
+                                           x, y, width, height);
+
+  controller.sleep(0);
+  EventUtils.synthesizeMouse(tree.body, x.value + 4, y.value + 4,
+                             {}, tree.ownerDocument.defaultView);
+  controller.sleep(0);
 
   utils.waitFor(function () controller.window.pendingAccount == null,
                 "Timeout waiting for pendingAccount to become null");
 
   // Ensure the page is fully loaded (e.g. onInit functions).
   wh.wait_for_frame_load(controller.e("contentFrame"),
     controller.window.pageURL(tree.contentView.getItemAtIndex(rowIndex)
                                               .getAttribute("PageTag")));
--- a/mail/test/mozmill/shared-modules/test-folder-display-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-folder-display-helpers.js
@@ -896,43 +896,16 @@ function _normalize_view_index(aViewInde
 
   if (aViewIndex < 0)
     return aController.dbView.QueryInterface(Ci.nsITreeView).rowCount +
       aViewIndex;
   return aViewIndex;
 }
 
 /**
- * Generic method to simulate a left click on a row in a <tree> element.
- *
- * @param aTree        The the element.
- * @param aRowIndex    Index of a row in the tree to click on.
- * @param aController  Controller object
- */
-function click_tree_row(aTree, aRowIndex, aController) {
-  if (aRowIndex < 0 || aRowIndex >= aTree.view.rowCount)
-    throw new Error("Row " + aRowIndex + " does not exist in the tree " + aTree.id + "!");
-
-  let selection = aTree.view.selection;
-  selection.select(aRowIndex);
-  aTree.treeBoxObject.ensureRowIsVisible(aRowIndex);
-
-  // get cell coordinates
-  let x = {}, y = {}, width = {}, height = {};
-  let column = aTree.columns[0];
-  aTree.treeBoxObject.getCoordsForCellItem(aRowIndex, column, "text",
-                                           x, y, width, height);
-
-  aController.sleep(0);
-  EventUtils.synthesizeMouse(aTree.body, x.value + 4, y.value + 4,
-                             {}, aTree.ownerDocument.defaultView);
-  aController.sleep(0);
-}
-
-/**
  * Pretend we are clicking on a row with our mouse.
  *
  * @param aViewIndex If >= 0, the view index provided, if < 0, a reference to
  *     a view index counting from the last row in the tree.  -1 indicates the
  *     last message in the tree, -2 the second to last, etc.
  * @param aController The controller in whose context to do this, defaults to
  *     |mc| if omitted.
  *