mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
32 lines
959 B
Java
32 lines
959 B
Java
#filter substitution
|
|
package @ANDROID_PACKAGE_NAME@.tests;
|
|
|
|
import @ANDROID_PACKAGE_NAME@.*;
|
|
|
|
public class testAwesomebar extends BaseTest {
|
|
public void testAwesomebar() {
|
|
setTestType("mochitest");
|
|
|
|
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
|
|
|
|
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);
|
|
}
|
|
}
|