Bug 820322 - Improve reliability of testBookmarksTab, testHistoryTab, testAllPagesTab; r=wesj

This commit is contained in:
Geoff Brown 2012-12-19 18:25:45 -07:00
parent b20d2896ea
commit 6dacc06db5
3 changed files with 5 additions and 5 deletions

View File

@ -71,7 +71,7 @@ public class testAllPagesTab extends BaseTest {
// This test fails, only when we're running tests
// mAsserter.is(host.getCurrentTab(), 0, "All pages tab is selected in tab strip");
mAsserter.ok(list != null, "checking that all pages list exists", list.toString());
mAsserter.isnot(list, null, "checking that all pages list exists");
mAsserter.is(list.getChildCount(), 5, "all pages list has 5 children (the default bookmarks)");
final int count = list.getChildCount();
@ -152,7 +152,7 @@ public class testAllPagesTab extends BaseTest {
boolean success = waitForTest(new BooleanTest() {
public boolean test() {
for (ListView view : views) {
if (view.getTag() == "allPages") {
if (view.getTag().equals("allPages")) {
listview = view;
return true;
}

View File

@ -60,7 +60,7 @@ public class testBookmarksTab extends BaseTest {
list = getBookmarksList();
mSolo.waitForText("Desktop Bookmarks");
mAsserter.ok(list != null, "checking that bookmarks list exists", list.toString());
mAsserter.isnot(list, null, "checking that bookmarks list exists");
int count = list.getChildCount();
mAsserter.is(count, 5, "bookmarks list has 5 children (defaults + a folder)");
@ -207,7 +207,7 @@ public class testBookmarksTab extends BaseTest {
boolean success = waitForTest(new BooleanTest() {
public boolean test() {
for (ListView view : views) {
if (view.getTag() == "bookmarks") {
if (view.getTag().equals("bookmarks")) {
list = view;
return true;
}

View File

@ -248,7 +248,7 @@ public class testHistoryTab extends PixelTest {
public boolean test() {
final ArrayList<ListView> views = mSolo.getCurrentListViews();
for (ListView view : views) {
if (view.getTag() == "history") {
if (view.getTag().equals("history")) {
listview = view;
return true;
}