mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819419 - Wait for list to settle before checking item, in testAllPagesTab; r=jmaher
This commit is contained in:
parent
78d1b0272b
commit
5d5b4c184f
@ -109,7 +109,7 @@ public class testAllPagesTab extends BaseTest {
|
||||
}
|
||||
|
||||
private void testContextMenu(String url) {
|
||||
ListView list = getAllPagesList(bookmarks[0]);
|
||||
ListView list = getAllPagesList(bookmarks[0], 5);
|
||||
|
||||
View child = list.getChildAt(0);
|
||||
mAsserter.ok(child != null, "first list item can be retrieved", child != null ? child.toString() : "null!");
|
||||
@ -126,11 +126,21 @@ public class testAllPagesTab extends BaseTest {
|
||||
}
|
||||
|
||||
private void testClick(String url) {
|
||||
ListView list = getAllPagesList(bookmarks[0]);
|
||||
ListView list = getAllPagesList(bookmarks[0], 5);
|
||||
|
||||
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
|
||||
View child = list.getChildAt(0);
|
||||
mAsserter.ok(child != null, "first list item can be retrieved", child != null ? child.toString() : "null!");
|
||||
// dump text for this child, to be sure of which list item is clicked
|
||||
ArrayList<View> views = mSolo.getViews(child);
|
||||
for (int j = 0; j < views.size(); j++) {
|
||||
View v = views.get(j);
|
||||
if (v instanceof TextView) {
|
||||
TextView t = (TextView)v;
|
||||
String string = t.getText().toString();
|
||||
mAsserter.dumpLog("first list item has text: " + string);
|
||||
}
|
||||
}
|
||||
mSolo.clickOnView(child);
|
||||
contentEventExpecter.blockForEvent();
|
||||
verifyUrl(url);
|
||||
|
Loading…
Reference in New Issue
Block a user