Bug 913683 - Part 1: Verify home pager is hidden before checking to make sure the page is painted, and increase the time we wait to make sure these things happen. r=gbrown, a=test-only
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 19 Sep 2013 09:37:58 -0400
changeset 160598 f89590e5824a1731c879d23a33a066bc81ff51dd
parent 160597 decf58f0d59656ffd2944a7c71ced2ca23a4bc64
child 160599 3d9f6b93d300cee7e977fa5b0aa94f26583078d4
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)
reviewersgbrown, test-only
bugs913683
milestone26.0a2
Bug 913683 - Part 1: Verify home pager is hidden before checking to make sure the page is painted, and increase the time we wait to make sure these things happen. r=gbrown, a=test-only
mobile/android/base/tests/BaseTest.java.in
mobile/android/base/tests/PixelTest.java.in
mobile/android/base/tests/testCheck2.java.in
--- a/mobile/android/base/tests/BaseTest.java.in
+++ b/mobile/android/base/tests/BaseTest.java.in
@@ -44,17 +44,17 @@ abstract class BaseTest extends Activity
     public static final int TEST_MOCHITEST = 0;
     public static final int TEST_TALOS = 1;
 
     private static final String TARGET_PACKAGE_ID = "org.mozilla.gecko";
     private static final String LAUNCH_ACTIVITY_FULL_CLASSNAME ="@ANDROID_PACKAGE_NAME@.App";
     private static final int VERIFY_URL_TIMEOUT = 2000;
     private static final int MAX_LIST_ATTEMPTS = 3;
     private static final int MAX_WAIT_ENABLED_TEXT_MS = 10000;
-    private static final int MAX_WAIT_HOME_PAGER_HIDDEN_MS = 10000;
+    private static final int MAX_WAIT_HOME_PAGER_HIDDEN_MS = 15000;
     public static final int MAX_WAIT_MS = 3000;
 
     // IDs for UI views
     private static final String BROWSER_TOOLBAR_ID = "browser_toolbar";
     protected static final String URL_EDIT_TEXT_ID = "url_edit_text";
     protected static final String URL_BAR_TITLE_ID = "url_bar_title";
 
     private static Class<Activity> mLauncherActivityClass;
--- a/mobile/android/base/tests/PixelTest.java.in
+++ b/mobile/android/base/tests/PixelTest.java.in
@@ -1,19 +1,20 @@
 #filter substitution
 package @ANDROID_PACKAGE_NAME@.tests;
 
 import @ANDROID_PACKAGE_NAME@.*;
 
 abstract class PixelTest extends BaseTest {
-    private static final long PAINT_CLEAR_DELAY = 3000; // milliseconds
+    private static final long PAINT_CLEAR_DELAY = 10000; // milliseconds
 
     protected final PaintedSurface loadAndGetPainted(String url) {
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
         loadUrl(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");
         }
         return p;
--- a/mobile/android/base/tests/testCheck2.java.in
+++ b/mobile/android/base/tests/testCheck2.java.in
@@ -7,17 +7,16 @@ public class testCheck2 extends PixelTes
         return TEST_TALOS;
     }
 
     public void testCheck2() {
         String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html");
 
         blockForGeckoReady();
         loadAndPaint(url);
-        verifyHomePagerHidden();
 
         mDriver.setupScrollHandling();
 
         /*
          * for this test, we load the timecube page, and replay a recorded sequence of events
          * that is a user panning/zooming around the page. specific things in the sequence
          * include:
          * - scroll on one axis followed by scroll on another axis