diff -r 000000000000 -r 6474c204b198 mobile/android/base/tests/testBookmarkKeyword.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mobile/android/base/tests/testBookmarkKeyword.java Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,27 @@ +package org.mozilla.gecko.tests; + + +public class testBookmarkKeyword extends AboutHomeTest { + public void testBookmarkKeyword() { + blockForGeckoReady(); + + final String url = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL); + final String keyword = "testkeyword"; + + // Add a bookmark, and update it to have a keyword. + mDatabaseHelper.addOrUpdateMobileBookmark(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, url); + mDatabaseHelper.updateBookmark(url, StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, keyword); + + // Enter the keyword in the urlbar. + inputAndLoadUrl(keyword); + + // Wait for the page to load. + waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); + + // Make sure the title of the page appeared. + verifyPageTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); + + // Delete the bookmark to clean up. + mDatabaseHelper.deleteBookmark(url); + } +}