mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 719954 - Bracket the clicking on list items with the event expecter to avoid a race condition. r=gbrown
This commit is contained in:
parent
adc2b503ed
commit
56eca05981
@ -99,12 +99,6 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
contentEventExpecter.blockForEvent();
|
||||
}
|
||||
|
||||
protected final void waitForLoad() {
|
||||
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
|
||||
// wait for screen to load
|
||||
contentEventExpecter.blockForEvent();
|
||||
}
|
||||
|
||||
protected final void loadUrl(String url) {
|
||||
enterUrl(url);
|
||||
hitEnterAndWait();
|
||||
|
@ -18,11 +18,15 @@ public class testBookmark extends BaseTest {
|
||||
//Click the top item in the bookmark list.
|
||||
clickOnAwesomeBar();
|
||||
mActions.sendSpecialKey(Actions.SpecialKey.RIGHT);
|
||||
|
||||
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
|
||||
|
||||
ArrayList<TextView> l = null;
|
||||
while (l == null || l.size() < 1) {
|
||||
l = mSolo.clickInList(1);
|
||||
}
|
||||
waitForLoad();
|
||||
|
||||
contentEventExpecter.blockForEvent();
|
||||
|
||||
//Items in bookmarks aren't constant so URL can't be tested.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user