1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/base/tests/testBookmarkKeyword.java Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +package org.mozilla.gecko.tests; 1.5 + 1.6 + 1.7 +public class testBookmarkKeyword extends AboutHomeTest { 1.8 + public void testBookmarkKeyword() { 1.9 + blockForGeckoReady(); 1.10 + 1.11 + final String url = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL); 1.12 + final String keyword = "testkeyword"; 1.13 + 1.14 + // Add a bookmark, and update it to have a keyword. 1.15 + mDatabaseHelper.addOrUpdateMobileBookmark(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, url); 1.16 + mDatabaseHelper.updateBookmark(url, StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, keyword); 1.17 + 1.18 + // Enter the keyword in the urlbar. 1.19 + inputAndLoadUrl(keyword); 1.20 + 1.21 + // Wait for the page to load. 1.22 + waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); 1.23 + 1.24 + // Make sure the title of the page appeared. 1.25 + verifyPageTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); 1.26 + 1.27 + // Delete the bookmark to clean up. 1.28 + mDatabaseHelper.deleteBookmark(url); 1.29 + } 1.30 +}