Bug 818095 - Intermittent testHistoryTab | history list has 3 children - got 0, expected 3. r=gbrown.

This commit is contained in:
Joel Maher 2012-12-31 13:27:21 -05:00
parent 0780ccfe6b
commit 808e6a48c8

View File

@ -99,13 +99,17 @@ public class testHistoryTab extends PixelTest {
private void testList(String url) {
listview = getHistoryList();
mSolo.waitForText(url);
// Around midnight we will switch from Today -> Yesterday, account for both
if (!mSolo.waitForText("Today")) {
mSolo.waitForText("Yesterday");
}
mAsserter.isnot(listview, null, "checking that history list exists");
mAsserter.is(listview.getChildCount(), 3, "history list has 3 children");
final int count = listview.getChildCount();
mAsserter.is(count, 3, "history list has 3 children");
String loadUrl = "";
for (int i = count - 1; i >= 0; i--) {
View child = listview.getChildAt(i);