mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
57 lines
1.7 KiB
Java
57 lines
1.7 KiB
Java
#filter substitution
|
|
package @ANDROID_PACKAGE_NAME@.tests;
|
|
|
|
import @ANDROID_PACKAGE_NAME@.*;
|
|
|
|
public class testCheck extends PixelTest {
|
|
private void pause(int length) {
|
|
try {
|
|
Thread.sleep(length);
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
protected int getTestType() {
|
|
return TEST_TALOS;
|
|
}
|
|
|
|
public void testCheck() {
|
|
String url = getAbsoluteUrl("/startup_test/fennecmark/timecube.html");
|
|
|
|
blockForGeckoReady();
|
|
|
|
loadAndPaint(url);
|
|
|
|
mDriver.setupScrollHandling();
|
|
|
|
// Setup scrolling coordinates.
|
|
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
|
|
int midX = mDriver.getGeckoWidth() / 2;
|
|
int height = mDriver.getGeckoHeight();
|
|
int topY = height / 8;
|
|
|
|
mDriver.startCheckerboardRecording();
|
|
|
|
// Scroll repeatedly downwards, then upwards. On each iteration of i,
|
|
// increase the scroll distance to test different scroll amounts.
|
|
for (int i = 2; i < 7; i++) {
|
|
int botY = (height * i / 8);
|
|
for (int j = 0; j < 3; j++) {
|
|
meh.dragSync(midX, botY, midX, topY, 200);
|
|
pause(1000);
|
|
}
|
|
for (int j = 0; j < 3; j++) {
|
|
meh.dragSync(midX, topY, midX, botY, 200);
|
|
pause(1000);
|
|
}
|
|
}
|
|
|
|
float completeness = mDriver.stopCheckerboardRecording();
|
|
mAsserter.dumpLog("__start_report" + completeness + "__end_report");
|
|
long msecs = System.currentTimeMillis();
|
|
mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp");
|
|
}
|
|
}
|