Bug 1151219 - Robocop page load refinements. r=margaret, a=test-only
authorGeoff Brown <gbrown@mozilla.com>
Fri, 10 Apr 2015 16:34:44 -0600
changeset 265553 15230953af6e57b0c78203d7edd5b1d1b1e23c04
parent 265552 65ab6d27be5a3f2dd9460a7210a83da3520854f5
child 265554 07cb25ccc7da38208a8942f7d9c5b4e59fab5947
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, test-only
bugs1151219
milestone39.0a2
Bug 1151219 - Robocop page load refinements. r=margaret, a=test-only
mobile/android/base/tests/PixelTest.java
mobile/android/base/tests/testAboutPage.java
mobile/android/base/tests/testClearPrivateData.java
mobile/android/base/tests/testTitleBar.java
--- a/mobile/android/base/tests/PixelTest.java
+++ b/mobile/android/base/tests/PixelTest.java
@@ -7,17 +7,17 @@ package org.mozilla.gecko.tests;
 import org.mozilla.gecko.Actions;
 import org.mozilla.gecko.PaintedSurface;
 
 abstract class PixelTest extends BaseTest {
     private static final long PAINT_CLEAR_DELAY = 10000; // milliseconds
 
     protected final PaintedSurface loadAndGetPainted(String url) {
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
-        loadUrl(url);
+        loadUrlAndWait(url);
         verifyHomePagerHidden();
         paintExpecter.blockUntilClear(PAINT_CLEAR_DELAY);
         paintExpecter.unregisterListener();
         PaintedSurface p = mDriver.getPaintedSurface();
         if (p == null) {
             mAsserter.ok(p != null, "checking that painted surface loaded", 
                  "painted surface loaded");
         }
--- a/mobile/android/base/tests/testAboutPage.java
+++ b/mobile/android/base/tests/testAboutPage.java
@@ -23,17 +23,17 @@ public class testAboutPage extends Pixel
         // Load the about: page and verify its title.
         String url = StringHelper.ABOUT_SCHEME;
         loadAndPaint(url);
 
         verifyUrlBarTitle(url);
 
         // Open a new page to remove the about: page from the current tab.
         url = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
-        loadUrl(url);
+        loadUrlAndWait(url);
 
         // At this point the page title should have been set.
         verifyUrlBarTitle(url);
 
         // Set up listeners to catch the page load we're about to do.
         Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added");
         Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
 
--- a/mobile/android/base/tests/testClearPrivateData.java
+++ b/mobile/android/base/tests/testClearPrivateData.java
@@ -32,17 +32,17 @@ public class testClearPrivateData extend
 
     private void clearHistory() {
 
         // Loading a page and adding a second one as bookmark to have user made bookmarks and history
         String blank1 = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
         String blank2 = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_02_URL);
         String title = StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE;
 
-        loadUrl(blank1);
+        loadUrlAndWait(blank1);
         verifyUrlBarTitle(blank1);
         mDatabaseHelper.addOrUpdateMobileBookmark(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE, blank2);
 
         // Checking that the history list is not empty
         verifyHistoryCount(1);
 
         //clear and check for device
         checkDevice(title, blank1);
--- a/mobile/android/base/tests/testTitleBar.java
+++ b/mobile/android/base/tests/testTitleBar.java
@@ -19,27 +19,27 @@ public class testTitleBar extends PixelT
     }
 
     public void checkOption() {
 
         String blank1 = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
         String title = StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE;
 
         // Loading a page
-        loadUrl(blank1);
+        loadUrlAndWait(blank1);
         verifyUrlBarTitle(blank1);
 
         // Ensure the title is displayed in the URL Bar
         selectOption(StringHelper.SHOW_PAGE_TITLE_LABEL);
-        loadUrl(blank1);
+        loadUrlAndWait(blank1);
         verifyUrlBarTitle(title);
 
         // Ensure the full URL is displayed in the URL Bar
         selectOption(StringHelper.SHOW_PAGE_ADDRESS_LABEL);
-        loadUrl(blank1);
+        loadUrlAndWait(blank1);
         verifyUrlBarTitle(blank1);
     }
 
     // Entering settings, changing the options: show title/page address option and verifing the device type because for phone there is an extra back action to exit the settings menu
     public void selectOption(String option) {
         selectSettingsItem(StringHelper.DISPLAY_SECTION_LABEL, StringHelper.TITLE_BAR_LABEL);
         mAsserter.ok(waitForText(StringHelper.SHOW_PAGE_TITLE_LABEL), "Waiting for the pop-up to open", "Pop up with the options was openend");
         mSolo.clickOnText(option);