2012-02-02 09:03:37 +00:00
|
|
|
#filter substitution
|
|
|
|
package @ANDROID_PACKAGE_NAME@.tests;
|
|
|
|
|
|
|
|
import @ANDROID_PACKAGE_NAME@.*;
|
|
|
|
|
2012-02-08 14:32:44 +00:00
|
|
|
public class testCheck extends PixelTest {
|
2012-02-09 11:37:17 +00:00
|
|
|
private void pause(int length) {
|
|
|
|
try {
|
|
|
|
Thread.sleep(length);
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-02 09:03:37 +00:00
|
|
|
public void testCheck() {
|
2012-02-02 15:09:26 +00:00
|
|
|
setTestType("talos");
|
2012-02-08 14:32:44 +00:00
|
|
|
String url = getAbsoluteUrl("/startup_test/fennecmark/wikipedia.html");
|
|
|
|
loadAndPaint(url);
|
2012-02-02 09:03:37 +00:00
|
|
|
|
|
|
|
mDriver.setupScrollHandling();
|
|
|
|
|
|
|
|
// Setup scrolling coordinates.
|
|
|
|
int midX = mDriver.getGeckoLeft() + mDriver.getGeckoWidth()/2;
|
|
|
|
int midY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/2;
|
2012-02-09 11:37:17 +00:00
|
|
|
int endY = mDriver.getGeckoTop() + mDriver.getGeckoHeight()/6;
|
2012-02-02 09:03:37 +00:00
|
|
|
|
|
|
|
mDriver.startCheckerboardRecording();
|
|
|
|
|
|
|
|
int i = 0;
|
2012-02-09 11:37:17 +00:00
|
|
|
// Scroll repeatedly downwards, then upwards. This test should take
|
|
|
|
// approximately 15 seconds.
|
2012-02-02 09:03:37 +00:00
|
|
|
do {
|
2012-02-09 11:37:17 +00:00
|
|
|
for (int j = 0; j < 3; j++) {
|
|
|
|
mActions.drag(midX, midX, midY, endY);
|
|
|
|
pause(500);
|
|
|
|
}
|
|
|
|
for (int j = 0; j < 3; j++) {
|
|
|
|
mActions.drag(midX, midX, endY, midY);
|
|
|
|
pause(500);
|
2012-02-02 09:03:37 +00:00
|
|
|
}
|
|
|
|
i++;
|
2012-02-09 11:37:17 +00:00
|
|
|
} while (i < 5);
|
2012-02-02 09:03:37 +00:00
|
|
|
|
2012-02-09 11:37:17 +00:00
|
|
|
float completeness = mDriver.stopCheckerboardRecording();
|
|
|
|
mAsserter.dumpLog("__start_report" + completeness + "__end_report");
|
2012-02-02 09:03:37 +00:00
|
|
|
long msecs = System.currentTimeMillis();
|
|
|
|
mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp");
|
2012-02-09 11:37:17 +00:00
|
|
|
}
|
2012-02-02 09:03:37 +00:00
|
|
|
}
|