Bug 770461 - Robocop: delay click on 'Today' until list population verified; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Thu, 27 Sep 2012 09:46:34 -0600
changeset 108317 c5a7b7544f124c4cfc8540c5eeaf5745eb1182fd
parent 108316 563605815bc382bac852e28accd0868669dc9f60
child 108318 1efdcc6dc41b20f0b715321af436e316a7fee3d9
push id23552
push userryanvm@gmail.com
push dateFri, 28 Sep 2012 03:05:08 +0000
treeherdermozilla-central@2d96ee8d9dd4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs770461
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 770461 - Robocop: delay click on 'Today' until list population verified; r=jmaher
mobile/android/base/tests/testHistoryTab.java.in
--- a/mobile/android/base/tests/testHistoryTab.java.in
+++ b/mobile/android/base/tests/testHistoryTab.java.in
@@ -132,20 +132,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;
                 }
@@ -173,16 +169,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();