gecko/mobile/android/base/tests/testAwesomebar.java.in

30 lines
892 B
Java

#filter substitution
package @ANDROID_PACKAGE_NAME@.tests;
import @ANDROID_PACKAGE_NAME@.*;
public class testAwesomebar extends BaseTest {
public void testAwesomebar() {
setTestType("mochitest");
String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
loadUrl(url);
mDriver.setupScrollHandling();
// Calculate where we should be dragging.
int midX = mDriver.getGeckoLeft() + mDriver.getGeckoWidth()/2;
int midY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/2;
int endY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/10;
for (int i = 0; i < 10; i++) {
mActions.drag(midX, midX, midY, endY);
try {
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
verifyUrl(url);
}
}