2013-09-03 21:19:26 -07:00
|
|
|
#filter substitution
|
|
|
|
package @ANDROID_PACKAGE_NAME@.tests;
|
|
|
|
|
|
|
|
import @ANDROID_PACKAGE_NAME@.*;
|
|
|
|
|
|
|
|
public class testBookmarkKeyword extends AboutHomeTest {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected int getTestType() {
|
|
|
|
return TEST_MOCHITEST;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void testBookmarkKeyword() {
|
|
|
|
blockForGeckoReady();
|
|
|
|
|
2013-08-21 07:11:13 -07:00
|
|
|
final String url = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
|
2013-09-03 21:19:26 -07:00
|
|
|
final String keyword = "testkeyword";
|
|
|
|
|
|
|
|
// Add a bookmark, and update it to have a keyword.
|
2013-08-21 07:11:13 -07:00
|
|
|
mDatabaseHelper.addOrUpdateMobileBookmark(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, url);
|
|
|
|
mDatabaseHelper.updateBookmark(url, StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, keyword);
|
2013-09-03 21:19:26 -07:00
|
|
|
|
|
|
|
// Enter the keyword in the urlbar.
|
|
|
|
inputAndLoadUrl(keyword);
|
|
|
|
|
|
|
|
// Wait for the page to load.
|
2013-08-21 07:11:13 -07:00
|
|
|
waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
|
2013-09-03 21:19:26 -07:00
|
|
|
|
|
|
|
// Make sure the title of the page appeared.
|
2013-08-21 07:11:13 -07:00
|
|
|
verifyPageTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
|
2013-09-03 21:19:26 -07:00
|
|
|
|
|
|
|
// Delete the bookmark to clean up.
|
2013-08-21 07:11:13 -07:00
|
|
|
mDatabaseHelper.deleteBookmark(url);
|
2013-09-03 21:19:26 -07:00
|
|
|
}
|
|
|
|
}
|