gecko/mobile/android/base/tests/testAwesomebar.java.in
Kartikaya Gupta d2f4ccc15c Bug 715443 - [2/2] More robotium cleanup. r=jmaher
- Extract utility functions into BaseTest so that there's a bunch of duplicated code everywhere
- Use long instead of Long in testPan to avoid object creation
2012-01-05 10:20:22 -05:00

29 lines
887 B
Java

#filter substitution
package @ANDROID_PACKAGE_NAME@.tests;
import @ANDROID_PACKAGE_NAME@.*;
public class testAwesomebar extends BaseTest {
private static final String URL = "http://mochi.test:8888/tests/robocop/robocop_blank_01.html";
public void testAwesomebar() {
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);
}
}