Bug 820322 - Improve reliability of testBookmarksTab, testHistoryTab, testAllPagesTab; r=wesj
authorGeoff Brown <gbrown@mozilla.com>
Wed, 19 Dec 2012 18:25:45 -0700
changeset 116588 8793edbf2a322be6a7a6b50bf4549cc3def11007
parent 116587 73f36736a1aeb82d61be4b66088ddfe0f5a99796
child 116589 54c6c42eb219ba2b849b7dbb2af1af6c943e4b86
push id24058
push useremorley@mozilla.com
push dateThu, 20 Dec 2012 21:06:10 +0000
treeherdermozilla-central@868b21bed3eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs820322
milestone20.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 820322 - Improve reliability of testBookmarksTab, testHistoryTab, testAllPagesTab; r=wesj
mobile/android/base/tests/testAllPagesTab.java.in
mobile/android/base/tests/testBookmarksTab.java.in
mobile/android/base/tests/testHistoryTab.java.in
--- a/mobile/android/base/tests/testAllPagesTab.java.in
+++ b/mobile/android/base/tests/testAllPagesTab.java.in
@@ -66,17 +66,17 @@ public class testAllPagesTab extends Bas
         mAsserter.is(tabwidget.getTabCount(), 3, "Three tabs shown");
         mAsserter.is(tabwidget.isStripEnabled(), false, "Strip is hidden");
 
         // check that the right tab is selected
         TabHost host = (TabHost)mSolo.getView(TabHost.class, 0);
         // This test fails, only when we're running tests
         // mAsserter.is(host.getCurrentTab(), 0, "All pages tab is selected in tab strip");
 
-        mAsserter.ok(list != null, "checking that all pages list exists", list.toString());
+        mAsserter.isnot(list, null, "checking that all pages list exists");
         mAsserter.is(list.getChildCount(), 5, "all pages list has 5 children (the default bookmarks)");
 
         final int count = list.getChildCount();
         String loadUrl = "";
         for (int i = count - 1; i >= 0; i--) {
             View child = list.getChildAt(i);
 
             ArrayList<View> views = mSolo.getViews(child);
@@ -147,17 +147,17 @@ public class testAllPagesTab extends Bas
         mSolo.waitForText(url);
 
         final ArrayList<ListView> views = mSolo.getCurrentListViews();
 
         listview = null;
         boolean success = waitForTest(new BooleanTest() {
             public boolean test() {
                for (ListView view : views) {
-                   if (view.getTag() == "allPages") {
+                   if (view.getTag().equals("allPages")) {
                        listview = view;
                        return true;
                    }
                }
                return false;
             }
         }, WAIT_FOR_CHILD_TIMEOUT);
         return listview;
--- a/mobile/android/base/tests/testBookmarksTab.java.in
+++ b/mobile/android/base/tests/testBookmarksTab.java.in
@@ -55,17 +55,17 @@ public class testBookmarksTab extends Ba
 
     private ListView list;
 
     private void testList(String url) {
         View child;
         list = getBookmarksList();
 
         mSolo.waitForText("Desktop Bookmarks");
-        mAsserter.ok(list != null, "checking that bookmarks list exists", list.toString());
+        mAsserter.isnot(list, null, "checking that bookmarks list exists");
 
         int count = list.getChildCount();
         mAsserter.is(count, 5, "bookmarks list has 5 children (defaults + a folder)");
  
         for (int i = count - 1; i >= 0; i--) {
             child = list.getChildAt(i);
             compareRow(child, i == 0 ? 1 : 2, 1);
         }
@@ -202,17 +202,17 @@ public class testBookmarksTab extends Ba
         mSolo.clickOnText("Bookmarks");
 
         final ArrayList<ListView> views = mSolo.getCurrentListViews();
 
         list = null;
         boolean success = waitForTest(new BooleanTest() {
             public boolean test() {
                for (ListView view : views) {
-                   if (view.getTag() == "bookmarks") {
+                   if (view.getTag().equals("bookmarks")) {
                        list = view;
                        return true;
                    }
                }
                return false;
             }
         }, WAIT_FOR_CHILD_TIMEOUT);
         return list;
--- a/mobile/android/base/tests/testHistoryTab.java.in
+++ b/mobile/android/base/tests/testHistoryTab.java.in
@@ -243,17 +243,17 @@ public class testHistoryTab extends Pixe
         Activity awesomeBarActivity = clickOnAwesomeBar();
         mSolo.clickOnText("History");
 
         listview = null;
         boolean success = waitForTest(new BooleanTest() {
             public boolean test() {
                final ArrayList<ListView> views = mSolo.getCurrentListViews();
                for (ListView view : views) {
-                   if (view.getTag() == "history") {
+                   if (view.getTag().equals("history")) {
                        listview = view;
                        return true;
                    }
                }
                return false;
             }
         }, WAIT_FOR_CHILD_TIMEOUT);