mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
fe44f36220
--HG-- extra : rebase_source : 376574e0c41b91c16a6be335584a4a61768bb4a9
57 lines
1.8 KiB
Java
57 lines
1.8 KiB
Java
#filter substitution
|
|
package @ANDROID_PACKAGE_NAME@.tests;
|
|
|
|
public class testTabHistory extends PixelTest {
|
|
|
|
@Override
|
|
protected int getTestType() {
|
|
return TEST_MOCHITEST;
|
|
}
|
|
|
|
/* This test will check the functionality of the Back, Forward and Reload buttons.
|
|
First it will determine the Device and the OS.
|
|
Then it will create the appropriate navigation mechanisms for back, forward and reload depending on device type and OS.
|
|
Finally it will run the tests */
|
|
|
|
public void testTabHistory() {
|
|
blockForGeckoReady();
|
|
|
|
String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
|
|
String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");
|
|
String url3 = getAbsoluteUrl("/robocop/robocop_blank_03.html");
|
|
|
|
// Create tab history
|
|
loadAndPaint(url);
|
|
loadAndPaint(url2);
|
|
loadAndPaint(url3);
|
|
|
|
// Get the device information and create the navigation for it
|
|
Device device = new Device();
|
|
Navigation nav = new Navigation(device);
|
|
mAsserter.dumpLog("device type: "+device.type);
|
|
mAsserter.dumpLog("device version: "+device.version);
|
|
mAsserter.dumpLog("device width: "+device.width);
|
|
mAsserter.dumpLog("device height: "+device.height);
|
|
|
|
// Go to the 2nd page
|
|
nav.back();
|
|
waitForText("Browser Blank Page 02");
|
|
verifyPageTitle("Browser Blank Page 02");
|
|
|
|
// Go to the first page
|
|
nav.back();
|
|
waitForText("Browser Blank Page 01");
|
|
verifyPageTitle("Browser Blank Page 01");
|
|
|
|
// Go forward to the second page
|
|
nav.forward();
|
|
waitForText("Browser Blank Page 02");
|
|
verifyPageTitle("Browser Blank Page 02");
|
|
|
|
// Reload page
|
|
nav.reload();
|
|
waitForText("Browser Blank Page 02");
|
|
verifyPageTitle("Browser Blank Page 02");
|
|
}
|
|
}
|