gecko/mobile/android/base/tests/testAboutHomeVisibility.java
Lucas Rocha 14c8882d88 Bug 958185 - Rename Page* terminology to Panel* in the home package (r=margaret)
--HG--
rename : mobile/android/base/home/BookmarksPage.java => mobile/android/base/home/BookmarksPanel.java
rename : mobile/android/base/home/HistoryPage.java => mobile/android/base/home/HistoryPanel.java
rename : mobile/android/base/home/LastTabsPage.java => mobile/android/base/home/LastTabsPanel.java
rename : mobile/android/base/home/ListPage.java => mobile/android/base/home/ListPanel.java
rename : mobile/android/base/home/MostRecentPage.java => mobile/android/base/home/MostRecentPanel.java
rename : mobile/android/base/home/ReadingListPage.java => mobile/android/base/home/ReadingListPanel.java
rename : mobile/android/base/home/TopSitesPage.java => mobile/android/base/home/TopSitesPanel.java
rename : mobile/android/base/resources/drawable/home_page_title_background.xml => mobile/android/base/resources/drawable/home_panel_title_background.xml
rename : mobile/android/base/resources/layout-large-land-v11/home_history_page.xml => mobile/android/base/resources/layout-large-land-v11/home_history_panel.xml
rename : mobile/android/base/resources/layout-xlarge-v11/home_history_page.xml => mobile/android/base/resources/layout-xlarge-v11/home_history_panel.xml
rename : mobile/android/base/resources/layout/home_bookmarks_page.xml => mobile/android/base/resources/layout/home_bookmarks_panel.xml
rename : mobile/android/base/resources/layout/home_history_page.xml => mobile/android/base/resources/layout/home_history_panel.xml
rename : mobile/android/base/resources/layout/home_last_tabs_page.xml => mobile/android/base/resources/layout/home_last_tabs_panel.xml
rename : mobile/android/base/resources/layout/home_most_recent_page.xml => mobile/android/base/resources/layout/home_most_recent_panel.xml
rename : mobile/android/base/resources/layout/home_reading_list_page.xml => mobile/android/base/resources/layout/home_reading_list_panel.xml
rename : mobile/android/base/resources/layout/home_top_sites_page.xml => mobile/android/base/resources/layout/home_top_sites_panel.xml
rename : mobile/android/base/tests/testBookmarksPage.java => mobile/android/base/tests/testBookmarksPanel.java
2014-01-10 17:18:07 -08:00

48 lines
1.8 KiB
Java

package org.mozilla.gecko.tests;
import static org.mozilla.gecko.tests.helpers.AssertionHelper.*;
import org.mozilla.gecko.tests.components.AboutHomeComponent.PanelType;
import org.mozilla.gecko.tests.helpers.*;
/**
* Tests the visibility of about:home after various interactions with the browser.
*/
public class testAboutHomeVisibility extends UITest {
public void testAboutHomeVisibility() {
GeckoHelper.blockForReady();
// Check initial state on about:home.
mToolbar.assertTitle(StringHelper.ABOUT_HOME_TITLE);
mAboutHome.assertVisible()
.assertCurrentPage(PanelType.TOP_SITES);
// Go to blank 01.
NavigationHelper.enterAndLoadUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
mAboutHome.assertNotVisible();
// Go to blank 02.
NavigationHelper.enterAndLoadUrl(StringHelper.ROBOCOP_BLANK_PAGE_02_URL);
mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE);
mAboutHome.assertNotVisible();
// Enter editing mode, where the about:home UI should be visible.
mToolbar.enterEditingMode();
mAboutHome.assertVisible()
.assertCurrentPage(PanelType.TOP_SITES);
// Dismiss editing mode, where the about:home UI should be gone.
mToolbar.dismissEditingMode();
mAboutHome.assertNotVisible();
// Loading about:home should show about:home again.
NavigationHelper.enterAndLoadUrl(StringHelper.ABOUT_HOME_URL);
mToolbar.assertTitle(StringHelper.ABOUT_HOME_TITLE);
mAboutHome.assertVisible()
.assertCurrentPage(PanelType.TOP_SITES);
// TODO: Type in a url and assert the go button is visible.
}
}