Bug 770461 - Robocop: delay click on 'Today' until list population verified; r=jmaher a=test-only
authorGeoff Brown <gbrown@mozilla.com>
Thu, 27 Sep 2012 09:46:34 -0600
changeset 106996 6fac5884b22cdb945498daadea3ae2d455216283
parent 106995 b1356f418c94985109bf9a1d0c51eb00b4d292ca
child 106997 5fe318acbe3833994d65ac5a22533157754b59a8
push id2183
push useremorley@mozilla.com
push dateMon, 01 Oct 2012 12:29:00 +0000
treeherdermozilla-aurora@40dd33501f4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, test-only
bugs770461
milestone17.0a2
Bug 770461 - Robocop: delay click on 'Today' until list population verified; r=jmaher a=test-only
mobile/android/base/tests/testHistoryTab.java.in
--- a/mobile/android/base/tests/testHistoryTab.java.in
+++ b/mobile/android/base/tests/testHistoryTab.java.in
@@ -121,20 +121,16 @@ public class testHistoryTab extends Pixe
     }
 
     private void testContextMenu(String url) {
         list = getHistoryList();
         // clear VKB
         mActions.sendSpecialKey(Actions.SpecialKey.BACK);
         mSolo.waitForText(url);
 
-        View child = list.getChildAt(0);
-        mSolo.clickLongOnView(child);
-        mAsserter.is(false, mSolo.waitForText("Open in New Tab"), "Header rows should not show a context menu");
-
         // wait for the history list to be populated
         mFirstChild = null;
         boolean success = waitForTest(new BooleanTest() {
             public boolean test() {
                 mFirstChild = list.getChildAt(1);
                 if (mFirstChild == null) {
                     return false;
                 }
@@ -162,16 +158,21 @@ public class testHistoryTab extends Pixe
 
             // TODO: Test clicking these does the right thing
             mAsserter.ok(mSolo.waitForText("Open in New Tab"), "Context menu has New Tab option", "Open in New Tab");
             mAsserter.ok(mSolo.searchText("Share", true), "Context menu has Share option", "Share");
             mAsserter.ok(mSolo.searchText("Remove", true), "Context menu has Remove option", "Remove");
             mAsserter.ok(mSolo.searchText("Add to Home Screen", true), "Context menu has Add to Home Screen option", "Add to Home Screen");
 
             mActions.sendSpecialKey(Actions.SpecialKey.BACK);
+
+            View child = list.getChildAt(0);
+            mSolo.clickLongOnView(child);
+            mAsserter.is(false, mSolo.waitForText("Open in New Tab"), "Header rows should not show a context menu");
+
         } else {
             mAsserter.ok(false, "waiting for history item", "history item available");
         }
         mActions.sendSpecialKey(Actions.SpecialKey.BACK);
     }
 
     private void testClick(String url) {
         list = getHistoryList();