bug 790102 - Frequent trobocheck, trobopan talosError: 'GeckoEventExpecter: blockForEvent timeout: Gecko:Ready [browser_output.txt]', use helper function to block for gecko:ready r=gbrown
authorBrad Lassey <blassey@mozilla.com>
Thu, 25 Oct 2012 15:37:39 -0400
changeset 111572 a63eeede2d15cc6ed00eedb512ae2fecd3e7b522
parent 111571 13455917d72ccf9ec930df70d21388fe80d32473
child 111573 48d71f46115247b5d309233f9dd4a23ed7794d2b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersgbrown
bugs790102
milestone19.0a1
bug 790102 - Frequent trobocheck, trobopan talosError: 'GeckoEventExpecter: blockForEvent timeout: Gecko:Ready [browser_output.txt]', use helper function to block for gecko:ready r=gbrown
mobile/android/base/tests/testAboutPage.java.in
mobile/android/base/tests/testAddonManager.java.in
mobile/android/base/tests/testAllPagesTab.java.in
mobile/android/base/tests/testAwesomebar.java.in
mobile/android/base/tests/testAxisLocking.java.in
mobile/android/base/tests/testBookmark.java.in
mobile/android/base/tests/testBookmarklets.java.in
mobile/android/base/tests/testBookmarksTab.java.in
mobile/android/base/tests/testCheck.java.in
mobile/android/base/tests/testCheck2.java.in
mobile/android/base/tests/testCheck3.java.in
mobile/android/base/tests/testFlingCorrectness.java.in
mobile/android/base/tests/testFormHistory.java.in
mobile/android/base/tests/testHistory.java.in
mobile/android/base/tests/testHistoryTab.java.in
mobile/android/base/tests/testLoad.java.in
mobile/android/base/tests/testNewTab.java.in
mobile/android/base/tests/testOverscroll.java.in
mobile/android/base/tests/testPan.java.in
mobile/android/base/tests/testPanCorrectness.java.in
mobile/android/base/tests/testPasswordEncrypt.java.in
mobile/android/base/tests/testPasswordProvider.java.in
mobile/android/base/tests/testPermissions.java.in
mobile/android/base/tests/testSearchSuggestions.java.in
mobile/android/base/tests/testThumbnails.java.in
mobile/android/base/tests/testWebContentContextMenu.java.in
mobile/android/base/tests/test_bug720538.java.in
--- a/mobile/android/base/tests/testAboutPage.java.in
+++ b/mobile/android/base/tests/testAboutPage.java.in
@@ -11,17 +11,17 @@ import android.util.Log;
  */
 public class testAboutPage extends PixelTest {
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testAboutPage() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // Load the about: page and verify its title
         String url = "about:";
         loadAndPaint(url);
 
         Element awesomebar = mDriver.findElement(getActivity(), "awesome_bar_title");
         mAsserter.isnot(awesomebar, null, "Got the awesomebar");
         assertMatches(awesomebar.getText(), "About (Fennec|Nightly|Aurora|Firefox|Firefox Beta)", "page title match");
--- a/mobile/android/base/tests/testAddonManager.java.in
+++ b/mobile/android/base/tests/testAddonManager.java.in
@@ -22,17 +22,17 @@ public class testAddonManager extends Pi
 
     /* This test will check the behavior of the Addons Manager:
     First the test will open the Addons Manager from the Menu and then close it
     Then the test will open the Addons Manager by visiting about:addons
     The test will tap/click on the addons.mozilla.org icon to open the AMO page in a new tab
     With the Addons Manager open the test will verify that when it is opened again from the menu no new tab will be opened*/
 
     public void testAddonManager() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // Use the menu to open the Addon Manger
         selectMenuItem("Add-ons");
 
         // Set up listeners to catch the page load we're about to do
         tabEventExpecter = mActions.expectGeckoEvent("Tab:Added");
         contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
 
--- a/mobile/android/base/tests/testAllPagesTab.java.in
+++ b/mobile/android/base/tests/testAllPagesTab.java.in
@@ -36,17 +36,17 @@ public class testAllPagesTab extends Bas
     };
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testAllPagesTab() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load one page so there is something in our history
         String url = getAbsoluteUrl("/robocop/robocop_big_link.html");
         loadUrl(url);
 
         testList(url);
         testClick(url);
         testContextMenu(url);
--- a/mobile/android/base/tests/testAwesomebar.java.in
+++ b/mobile/android/base/tests/testAwesomebar.java.in
@@ -5,17 +5,17 @@ import @ANDROID_PACKAGE_NAME@.*;
 
 public class testAwesomebar extends BaseTest {
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testAwesomebar() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
         loadUrl(url);
 
         mDriver.setupScrollHandling();
         // Calculate where we should be dragging.
         int midX = mDriver.getGeckoLeft() + mDriver.getGeckoWidth()/2;
         int midY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/2;
--- a/mobile/android/base/tests/testAxisLocking.java.in
+++ b/mobile/android/base/tests/testAxisLocking.java.in
@@ -18,17 +18,17 @@ public class testAxisLocking extends Pix
         return TEST_MOCHITEST;
     }
 
     public void testAxisLocking() {
         String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
 
         MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 100 pixels with a slight angle. verify that
         // axis locking prevents any horizontal scrolling
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
         meh.dragSync(20, 150, 10, 50);
--- a/mobile/android/base/tests/testBookmark.java.in
+++ b/mobile/android/base/tests/testBookmark.java.in
@@ -69,17 +69,17 @@ public class testBookmark extends PixelT
         } catch(java.lang.reflect.InvocationTargetException ex) {
             mAsserter.is(true, false, "Error calling addBookmark");
         }
     }
 
     public void runAwesomeScreenTest() {
         final long PAINT_CLEAR_DELAY = 1000;  // milliseconds
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // Open the bookmark list and check the root folder view
         ListView bookmarksList = openBookmarksList();
 
         // Clear VKB so that list is not obscured
         mActions.sendSpecialKey(Actions.SpecialKey.BACK);
 
         // Wait for bookmark to appear in list
--- a/mobile/android/base/tests/testBookmarklets.java.in
+++ b/mobile/android/base/tests/testBookmarklets.java.in
@@ -16,17 +16,17 @@ public class testBookmarklets extends Pi
     }
 
     public void testBookmarklets() {
         final String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
         final String title = "alertBookmarklet";
         final String js = "javascript:alert(12 + .34)";
         boolean alerted;
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load a standard page so bookmarklets work
         loadAndPaint(url);
 
         // verify that user-entered bookmarklets do *not* work
         enterUrl(js);
         mActions.sendSpecialKey(Actions.SpecialKey.ENTER);
         alerted = waitForTest(new BooleanTest() {
--- a/mobile/android/base/tests/testBookmarksTab.java.in
+++ b/mobile/android/base/tests/testBookmarksTab.java.in
@@ -36,17 +36,17 @@ public class testBookmarksTab extends Ba
     };
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testBookmarksTab() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
         String url = "http://www.example.com";
 
         // add one page to desktop folders so that we can see them
         addBookmark("BOOKMARK_TITLE", url);
 
         testList(url);
         testContextMenu(url);
     }
--- a/mobile/android/base/tests/testCheck.java.in
+++ b/mobile/android/base/tests/testCheck.java.in
@@ -15,17 +15,17 @@ public class testCheck extends PixelTest
     @Override
     protected int getTestType() {
         return TEST_TALOS;
     }
 
     public void testCheck() {
         String url = getAbsoluteUrl("/startup_test/fennecmark/timecube.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         loadAndPaint(url);
 
         mDriver.setupScrollHandling();
 
         // Setup scrolling coordinates.
         MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
         int midX = mDriver.getGeckoWidth() / 2;
--- a/mobile/android/base/tests/testCheck2.java.in
+++ b/mobile/android/base/tests/testCheck2.java.in
@@ -7,17 +7,17 @@ public class testCheck2 extends PixelTes
     @Override
     protected int getTestType() {
         return TEST_TALOS;
     }
 
     public void testCheck2() {
         String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
         loadAndPaint(url);
         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
--- a/mobile/android/base/tests/testCheck3.java.in
+++ b/mobile/android/base/tests/testCheck3.java.in
@@ -18,17 +18,17 @@ public class testCheck3 extends PixelTes
         if (!disableScreenshot()) {
             // if disabling the screenshot fails, there is no point in running
             // this test, so abort. the lack of __start_report output from the
             // end of the test should get picked up as an error by the talos
             // harness.
             return;
         }
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
         loadAndPaint(url);
         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
--- a/mobile/android/base/tests/testFlingCorrectness.java.in
+++ b/mobile/android/base/tests/testFlingCorrectness.java.in
@@ -16,17 +16,17 @@ public class testFlingCorrectness extend
         return TEST_MOCHITEST;
     }
 
     public void testFlingCorrectness() {
         String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
 
         MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 200 pixels (use two drags instead of one in case
         // the screen size is small)
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
         meh.dragSync(10, 150, 10, 50);
--- a/mobile/android/base/tests/testFormHistory.java.in
+++ b/mobile/android/base/tests/testFormHistory.java.in
@@ -28,19 +28,18 @@ public class testFormHistory extends Bas
     }
 
     public void testFormHistory() {
         Context context = (Context)getActivity();
         ContentResolver cr = context.getContentResolver();
         ContentValues[] cvs = new ContentValues[1];
         cvs[0] = new ContentValues();
   
-        Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
-        contentEventExpecter.blockForEvent();
-  
+	blockForGeckoReady();
+
         Uri formHistoryUri;
         Uri insertUri;
         Uri expectedUri;
         int numUpdated;
         int numDeleted;
 
         try {
             ClassLoader classLoader = getActivity().getClassLoader();
--- a/mobile/android/base/tests/testHistory.java.in
+++ b/mobile/android/base/tests/testHistory.java.in
@@ -14,17 +14,17 @@ public class testHistory extends PixelTe
     private View mFirstChild;
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testHistory() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
         String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");
         String url3 = getAbsoluteUrl("/robocop/robocop_blank_03.html");
 
         loadAndPaint(url);
         verifyPageTitle("Browser Blank Page 01");
         loadAndPaint(url2);
--- a/mobile/android/base/tests/testHistoryTab.java.in
+++ b/mobile/android/base/tests/testHistoryTab.java.in
@@ -40,17 +40,17 @@ public class testHistoryTab extends Pixe
     private boolean mNearMidnight;
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testHistoryTab() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // very approximate date-rollover detection
         Calendar cal = new GregorianCalendar();
         mNearMidnight = (cal.get(Calendar.HOUR_OF_DAY) == 23);
 
         // load two pages so there is something in our history
         // bookmark one of them
         String url = getAbsoluteUrl("/robocop/robocop_big_link.html");
--- a/mobile/android/base/tests/testLoad.java.in
+++ b/mobile/android/base/tests/testLoad.java.in
@@ -13,15 +13,15 @@ public class testLoad extends PixelTest 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testLoad() {
         String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         loadAndVerifyBoxes(url);
 
         verifyUrl(url);
     }
 }
--- a/mobile/android/base/tests/testNewTab.java.in
+++ b/mobile/android/base/tests/testNewTab.java.in
@@ -18,17 +18,17 @@ public class testNewTab extends BaseTest
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testNewTab() {
         String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
         String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         Activity activity = getActivity();
         tabCount = mDriver.findElement(activity, "tabs_count");
         tabs = mDriver.findElement(activity, "tabs");
         addTab = mDriver.findElement(activity, "add_tab");
         closeTab = mDriver.findElement(activity, "close");
         mAsserter.ok(tabCount != null &&
                      tabs != null &&
--- a/mobile/android/base/tests/testOverscroll.java.in
+++ b/mobile/android/base/tests/testOverscroll.java.in
@@ -16,17 +16,17 @@ public class testOverscroll extends Pixe
         return TEST_MOCHITEST;
     }
 
     public void testOverscroll() {
         String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
 
         MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page downwards by 100 pixels so that it goes into overscroll.
         // wait for it to bounce back and check we're at the right spot.
         // the screen size is small). Note that since we only go into overscroll
         // and back this should NOT trigger a gecko-paint
--- a/mobile/android/base/tests/testPan.java.in
+++ b/mobile/android/base/tests/testPan.java.in
@@ -12,17 +12,17 @@ public class testPan extends PixelTest {
     @Override
     protected int getTestType() {
         return TEST_TALOS;
     }
 
     public void testPan() {
         String url = getAbsoluteUrl("/startup_test/fennecmark/wikipedia.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         loadAndPaint(url);
 
         mDriver.setupScrollHandling();
 
         // Setup scrolling coordinates.
         int midX = mDriver.getGeckoLeft() + mDriver.getGeckoWidth()/2;
         int midY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/2;
--- a/mobile/android/base/tests/testPanCorrectness.java.in
+++ b/mobile/android/base/tests/testPanCorrectness.java.in
@@ -16,17 +16,17 @@ public class testPanCorrectness extends 
         return TEST_MOCHITEST;
     }
 
     public void testPanCorrectness() {
         String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
 
         MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 100 pixels
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
         meh.dragSync(10, 150, 10, 50);
         PaintedSurface painted = waitForPaint(paintExpecter);
--- a/mobile/android/base/tests/testPasswordEncrypt.java.in
+++ b/mobile/android/base/tests/testPasswordEncrypt.java.in
@@ -22,18 +22,17 @@ public class testPasswordEncrypt extends
     }
 
     public void testPasswordEncrypt() {
       Context context = (Context)getActivity();
       ContentResolver cr = context.getContentResolver();
       mAsserter.isnot(cr, null, "Found a content resolver");
       ContentValues cvs = new ContentValues();
 
-      Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
-      contentEventExpecter.blockForEvent();
+      blockForGeckoReady();
 
       File db = new File(mProfile, "signons.sqlite");
       String dbPath = db.getPath();
 
       Uri passwordUri;
       try {
           ClassLoader classLoader = getActivity().getClassLoader();
           Class pwds = classLoader.loadClass("org.mozilla.gecko.db.BrowserContract$Passwords");
--- a/mobile/android/base/tests/testPasswordProvider.java.in
+++ b/mobile/android/base/tests/testPasswordProvider.java.in
@@ -26,18 +26,17 @@ public class testPasswordProvider extend
     }
 
     public void testPasswordProvider() {
         Context context = (Context)getActivity();
         ContentResolver cr = context.getContentResolver();
         ContentValues[] cvs = new ContentValues[1];
         cvs[0] = new ContentValues();
   
-        Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
-        contentEventExpecter.blockForEvent();
+        blockForGeckoReady();
   
         Uri passwordUri;
         try {
             ClassLoader classLoader = getActivity().getClassLoader();
             Class pwds = classLoader.loadClass("org.mozilla.gecko.db.BrowserContract$Passwords");
       
             cvs[0].put("hostname", "http://www.example.com");
             cvs[0].put("httpRealm", "http://www.example.com");
--- a/mobile/android/base/tests/testPermissions.java.in
+++ b/mobile/android/base/tests/testPermissions.java.in
@@ -10,17 +10,17 @@ public class testPermissions extends Pix
     private Actions.RepeatedEventExpecter mPaintExpecter;
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testPermissions() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         geolocationTest();
     }
 
     private void geolocationTest() {
         // Test geolocation notification
         loadAndPaint(getAbsoluteUrl("/robocop/robocop_geolocation.html"));
         mSolo.waitForText("wants your location");
--- a/mobile/android/base/tests/testSearchSuggestions.java.in
+++ b/mobile/android/base/tests/testSearchSuggestions.java.in
@@ -28,17 +28,17 @@ public class testSearchSuggestions exten
     private static final String SUGGESTION_TEMPLATE = "/robocop/robocop_suggestions.sjs?query=__searchTerms__";
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testSearchSuggestions() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // Map of expected values. See robocop_suggestions.sjs.
         final HashMap<String, ArrayList<String>> suggestMap = new HashMap<String, ArrayList<String>>();
         buildSuggestMap(suggestMap);
 
         final int suggestionLayoutId = mDriver.findElement(getActivity(), "suggestion_layout").getId();
         final int suggestionTextId = mDriver.findElement(getActivity(), "suggestion_text").getId();
 
--- a/mobile/android/base/tests/testThumbnails.java.in
+++ b/mobile/android/base/tests/testThumbnails.java.in
@@ -40,17 +40,17 @@ public class testThumbnails extends Base
         final String site1Title = "changeColor";
         final String site2Title = "do404";
 
         // the session snapshot runnable is run 500ms after document stop. a
         // 3000ms delay gives us 2.5 seconds to take the screenshot, which
         // should be plenty of time, even on slow devices
         final int thumbnailDelay = 3000;
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         // load sites; both will return HTTP 200 with a green background
         loadUrl(site1Url);
         mSolo.sleep(thumbnailDelay);
         loadUrl(site2Url);
         mSolo.sleep(thumbnailDelay);
         loadUrl("about:home");
         waitForTest(new ThumbnailTest(site1Title, Color.GREEN), 5000);
--- a/mobile/android/base/tests/testWebContentContextMenu.java.in
+++ b/mobile/android/base/tests/testWebContentContextMenu.java.in
@@ -11,17 +11,17 @@ import android.util.DisplayMetrics;
  */
 public class testWebContentContextMenu extends PixelTest {
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void testWebContentContextMenu() {
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         DisplayMetrics dm = new DisplayMetrics();
         getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
 
         // The link has a 60px height, so let's try to hit the middle
         float top = mDriver.getGeckoTop() + 30 * dm.density;
         float left = mDriver.getGeckoLeft() + mDriver.getGeckoWidth() / 2;
 
--- a/mobile/android/base/tests/test_bug720538.java.in
+++ b/mobile/android/base/tests/test_bug720538.java.in
@@ -8,17 +8,17 @@ public class test_bug720538 extends Pixe
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
 
     public void test_bug720538() {
         String url = getAbsoluteUrl("/robocop/test_bug720538.html");
 
-        mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
+        blockForGeckoReady();
 
         /*
          * for this test, we load the associated test_bug720538.html file. this file has two
          * iframes (painted completely blue - #0000FF) and the rest of the page is the background
          * color, which is #008000 green. When we first render the page there is an iframe in
          * the top-left corner, and when we double-tap on it it should zoom to fill the visible
          * view area leaving a little bit of space on either side. We can test for this by checking
          * a few pixels to ensure that there is some background visible on either side of the iframe.