Bug 769919 - Clear VKB in Robocop testBookmark and testBookmarksTab to ensure correct list child count; r=jmaher

This commit is contained in:
Geoff Brown 2012-07-05 07:55:30 -07:00
parent 45f24fb0bf
commit 7cc9958f85
2 changed files with 13 additions and 2 deletions

View File

@ -77,6 +77,9 @@ public class testBookmark extends BaseTest {
// Open the bookmark list and check the root folder view
ListView bookmarksList = openBookmarksList();
// Clear VKB so that list is not obscured
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
// Wait for bookmark to appear in list
mSolo.waitForText(ABOUT_HOME_URL);
@ -125,9 +128,9 @@ public class testBookmark extends BaseTest {
Boolean res = (Boolean)mIsBookmarked.invoke(null, getActivity().getContentResolver(), BOOKMARK_URL);
return res.booleanValue();
} catch(java.lang.IllegalAccessException ex) {
mAsserter.is(true, false, "Can not call addBookmark");
mAsserter.is(true, false, "Can not call isBookmarked");
} catch(java.lang.reflect.InvocationTargetException ex) {
mAsserter.is(true, false, "Error calling addBookmark");
mAsserter.is(true, false, "Error calling isBookmarked");
}
return !isBookmarked;
}

View File

@ -54,6 +54,10 @@ public class testBookmarksTab extends BaseTest {
private void testList(String url) {
View child;
ListView list = getBookmarksList();
// Clear VKB so that list is not obscured
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
mSolo.waitForText(url);
mAsserter.ok(list != null, "checking that bookmarks list exists", list.toString());
@ -99,6 +103,10 @@ public class testBookmarksTab extends BaseTest {
private void testContextMenu(String url) {
ListView list = getBookmarksList();
// Clear VKB so that list is not obscured
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
mSolo.waitForText(url);
// test long tap on a folder, this should fail but will still open the folder