|
1 package org.mozilla.gecko.tests; |
|
2 |
|
3 |
|
4 public class testBookmarkKeyword extends AboutHomeTest { |
|
5 public void testBookmarkKeyword() { |
|
6 blockForGeckoReady(); |
|
7 |
|
8 final String url = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL); |
|
9 final String keyword = "testkeyword"; |
|
10 |
|
11 // Add a bookmark, and update it to have a keyword. |
|
12 mDatabaseHelper.addOrUpdateMobileBookmark(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, url); |
|
13 mDatabaseHelper.updateBookmark(url, StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, keyword); |
|
14 |
|
15 // Enter the keyword in the urlbar. |
|
16 inputAndLoadUrl(keyword); |
|
17 |
|
18 // Wait for the page to load. |
|
19 waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); |
|
20 |
|
21 // Make sure the title of the page appeared. |
|
22 verifyPageTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); |
|
23 |
|
24 // Delete the bookmark to clean up. |
|
25 mDatabaseHelper.deleteBookmark(url); |
|
26 } |
|
27 } |