Bug 870768 - Fix intermittent failure in robocop testHistoryTab; r=wesj

This commit is contained in:
Geoff Brown 2013-05-14 11:37:07 -06:00
parent 78feb83f6b
commit 751302af38

View File

@ -213,7 +213,6 @@ public class testHistoryTab extends PixelTest {
mSolo.clickOnView(child);
// nothing should happen
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
mChild = null;
boolean success = waitForTest(new BooleanTest() {
@Override
@ -227,14 +226,17 @@ public class testHistoryTab extends PixelTest {
}
}, MAX_WAIT_MS);
if (success == true && mChild != null) {
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
mSolo.clickOnView(mChild);
contentEventExpecter.blockForEvent();
mSolo.sleep(500);
contentEventExpecter.unregisterListener();
// TODO: Find a better way to wait for update before checking
// awesome bar; lesser waits result in intermittent failures
mSolo.sleep(2000);
verifyUrl(url);
} else {
mAsserter.ok(false, "waiting for history item", "history item available");
}
contentEventExpecter.unregisterListener();
}
@Override