mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 948387 - Avoid intermittent NPE in testAddSearchEngine; r=wesj
This commit is contained in:
parent
8548aba581
commit
bdae0d2fc6
@ -136,7 +136,15 @@ public class testAddSearchEngine extends AboutHomeTest {
|
||||
boolean correctNumSearchEnginesDisplayed = waitForTest(new BooleanTest() {
|
||||
@Override
|
||||
public boolean test() {
|
||||
return (findListViewWithTag("browser_search").getAdapter().getCount() == expectedCount);
|
||||
ListView list = findListViewWithTag("browser_search");
|
||||
if (list == null) {
|
||||
return false;
|
||||
}
|
||||
ListAdapter adapter = list.getAdapter();
|
||||
if (adapter == null) {
|
||||
return false;
|
||||
}
|
||||
return (adapter.getCount() == expectedCount);
|
||||
}
|
||||
}, MAX_WAIT_TEST_MS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user