Backed out changeset 71118c075821 (bug 947550) r=margaret on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-02-06 16:50:43 -08:00
parent 9a04e40830
commit 86f62c4c20
2 changed files with 6 additions and 18 deletions

View File

@ -27,25 +27,13 @@ public final class GeckoHelper {
}
public static void blockForReady() {
blockForEvent("Gecko:Ready");
}
final EventExpecter geckoReady = sActions.expectGeckoEvent("Gecko:Ready");
/**
* Blocks for the "Gecko:DelayedStartup" event, which occurs after "Gecko:Ready" and the
* first page load.
*/
public static void blockForDelayedStartup() {
blockForEvent("Gecko:DelayedStartup");
}
private static void blockForEvent(final String eventName) {
final EventExpecter eventExpecter = sActions.expectGeckoEvent(eventName);
final boolean isRunning = GeckoThread.checkLaunchState(LaunchState.GeckoRunning);
if (!isRunning) {
eventExpecter.blockForEvent();
final boolean isReady = GeckoThread.checkLaunchState(LaunchState.GeckoRunning);
if (!isReady) {
geckoReady.blockForEvent();
}
eventExpecter.unregisterListener();
geckoReady.unregisterListener();
}
}

View File

@ -13,7 +13,7 @@ public class testAboutHomePageNavigation extends UITest {
// enum for both phone and tablet, then swiping through the panels. This will also
// benefit having a HomePager with custom panels.
public void testAboutHomePageNavigation() {
GeckoHelper.blockForDelayedStartup();
GeckoHelper.blockForReady();
mAboutHome.assertVisible()
.assertCurrentPanel(PanelType.TOP_SITES);