mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 720930 - Robocop: update testBookmark to allow for zero bookmarks; r=jmaher
This commit is contained in:
parent
b34f83251c
commit
dd9399798b
@ -3,10 +3,12 @@ package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.widget.TextView;
|
||||
import android.os.SystemClock;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class testBookmark extends BaseTest {
|
||||
private static final String URL = "http://mochi.test:8888/tests/robocop/robocop_blank_02.html";
|
||||
private static final long MAX_WAIT_MS = 10 * 1000;
|
||||
|
||||
public void testBookmark() {
|
||||
enterUrl(URL);
|
||||
@ -21,8 +23,13 @@ public class testBookmark extends BaseTest {
|
||||
|
||||
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
|
||||
|
||||
long waitStart = SystemClock.uptimeMillis();
|
||||
ArrayList<TextView> l = null;
|
||||
while (l == null || l.size() < 1) {
|
||||
if (SystemClock.uptimeMillis() - waitStart > MAX_WAIT_MS) {
|
||||
mAsserter.dumpLog("testBookmark: timed out waiting for bookmark list -- no bookmarks defined?");
|
||||
return;
|
||||
}
|
||||
l = mSolo.clickInList(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user