mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 71118c075821 (bug 947550) r=margaret on a CLOSED TREE
This commit is contained in:
parent
9a04e40830
commit
86f62c4c20
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user