зеркало из https://github.com/mozilla/pjs.git
Bug 720930 - Robocop: update testBookmark to allow for zero bookmarks; r=jmaher
This commit is contained in:
Родитель
74ace84ded
Коммит
44443b0495
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче