mobile/android/base/tests/testSessionHistory.java

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 package org.mozilla.gecko.tests;
michael@0 2
michael@0 3 import org.mozilla.gecko.tests.helpers.GeckoHelper;
michael@0 4 import org.mozilla.gecko.tests.helpers.NavigationHelper;
michael@0 5
michael@0 6 /**
michael@0 7 * Tests that navigating through session history (ex: forward, back) sets the correct UI state.
michael@0 8 */
michael@0 9 public class testSessionHistory extends UITest {
michael@0 10 public void testSessionHistory() {
michael@0 11 GeckoHelper.blockForReady();
michael@0 12
michael@0 13 NavigationHelper.enterAndLoadUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
michael@0 14 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
michael@0 15
michael@0 16 NavigationHelper.enterAndLoadUrl(StringHelper.ROBOCOP_BLANK_PAGE_02_URL);
michael@0 17 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE);
michael@0 18
michael@0 19 NavigationHelper.enterAndLoadUrl(StringHelper.ROBOCOP_BLANK_PAGE_03_URL);
michael@0 20 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_03_TITLE);
michael@0 21
michael@0 22 NavigationHelper.goBack();
michael@0 23 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE);
michael@0 24
michael@0 25 NavigationHelper.goBack();
michael@0 26 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE);
michael@0 27
michael@0 28 NavigationHelper.goForward();
michael@0 29 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE);
michael@0 30
michael@0 31 // TODO: Implement this functionality and uncomment.
michael@0 32 /*
michael@0 33 NavigationHelper.reload();
michael@0 34 mToolbar.assertTitle(StringHelper.ROBOCOP_BLANK_PAGE_02_TITLE);
michael@0 35 */
michael@0 36 }
michael@0 37 }

mercurial