Bug 848671 - Intermittent testBookmark | bookmark added successfully - got false, expected true. r=lucasr, f=adriant, a=test-only
authorMark Capella <markcapella@twcny.rr.com>
Wed, 23 Oct 2013 10:13:53 -0400
changeset 160871 70f39c7345afd7a3adc6484badba470d0b8901e1
parent 160870 cdd327836fb41ab2c659a78dece341ecf46ded93
child 160872 a1325abdf5eb6fa801f8776ab9d2dd6f4ab9c0c3
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, test-only
bugs848671
milestone26.0a2
Bug 848671 - Intermittent testBookmark | bookmark added successfully - got false, expected true. r=lucasr, f=adriant, a=test-only
mobile/android/base/tests/testBookmark.java.in
--- a/mobile/android/base/tests/testBookmark.java.in
+++ b/mobile/android/base/tests/testBookmark.java.in
@@ -8,26 +8,23 @@ import android.widget.ListView;
 
 import java.util.Arrays;
 import java.util.ArrayList;
 
 public class testBookmark extends AboutHomeTest {
     private static String BOOKMARK_URL;
     private static int WAIT_FOR_BOOKMARKED_TIMEOUT = 10000;
 
-    Navigation nav;
-
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testBookmark() {
         BOOKMARK_URL = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
-        nav = new Navigation(mDevice);
         runAboutHomeTest();
         runMenuTest();
     }
 
     public void runMenuTest() {
         mAsserter.is(mDatabaseHelper.isBookmark(BOOKMARK_URL), false, "Page is not bookmarked initially");
         setUpBookmark(); // loads the page, taps the star button, and waits for the "Bookmark Added" message
         waitForBookmarked(true);
@@ -65,20 +62,20 @@ public class testBookmark extends AboutH
         }, WAIT_FOR_BOOKMARKED_TIMEOUT);
         mAsserter.is(bookmarked, true, BOOKMARK_URL + " was " + (isBookmarked ? "added as a bookmark" : "removed from bookmarks"));
     }
 
     private void setUpBookmark() {
         // Bookmark a page for the test
         loadUrl(BOOKMARK_URL);
         waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
-        nav.bookmark();
+        toggleBookmark();
         mAsserter.is(waitForText(StringHelper.BOOKMARK_ADDED_LABEL), true, "bookmark added successfully");
     }
 
     private void cleanUpBookmark() {
         // Go back to the page we bookmarked
         loadUrl(BOOKMARK_URL);
         waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
-        nav.bookmark();
+        toggleBookmark();
         mAsserter.is(waitForText(StringHelper.BOOKMARK_REMOVED_LABEL), true, "bookmark removed successfully");
     }
 }