Bug 815786 - Disable testCheck3 in Talos. r=gbrown

This commit is contained in:
Joel Maher 2012-11-30 13:04:30 -05:00
parent 7204d8261c
commit 626982768f
2 changed files with 0 additions and 83 deletions

View File

@ -31,5 +31,4 @@
#[testPan]
#[testCheck]
#[testCheck2]
#[testCheck3]
#[testBrowserProviderPerf]

View File

@ -1,82 +0,0 @@
#filter substitution
package @ANDROID_PACKAGE_NAME@.tests;
import @ANDROID_PACKAGE_NAME@.*;
import java.lang.reflect.Method;
public class testCheck3 extends PixelTest {
@Override
protected int getTestType() {
return TEST_TALOS;
}
public void testCheck3() {
String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html");
// Disable Fennec's low-res screenshot for the duration of this test;
// this distinguishes this test from testCheck2, which is otherwise
// identical.
if (!disableScreenshot()) {
// if disabling the screenshot fails, there is no point in running
// this test, so abort. the lack of __start_report output from the
// end of the test should get picked up as an error by the talos
// harness.
return;
}
blockForGeckoReady();
loadAndPaint(url);
mDriver.setupScrollHandling();
/*
* for this test, we load the timecube page, and replay a recorded sequence of events
* that is a user panning/zooming around the page. specific things in the sequence
* include:
* - scroll on one axis followed by scroll on another axis
* - pinch zoom (in and out)
* - double-tap zoom (in and out)
* - multi-fling panning with different velocities on each fling
*
* this checkerboarding metric is going to be more of a "functional" style test than
* a "unit" style test; i.e. it covers a little bit of a lot of things to measure
* overall performance, but doesn't really allow identifying which part is slow.
*/
MotionEventReplayer mer = new MotionEventReplayer(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
float completeness = 0.0f;
mDriver.startCheckerboardRecording();
// replay the events
try {
mer.replayEvents(getAsset("testcheck2-motionevents"));
// give it some time to draw any final frames
Thread.sleep(1000);
completeness = mDriver.stopCheckerboardRecording();
} catch (Exception e) {
mAsserter.ok(false, "Exception while replaying events", e.toString());
}
mAsserter.dumpLog("__start_report" + completeness + "__end_report");
System.out.println("Completeness score: " + completeness);
long msecs = System.currentTimeMillis();
mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp");
}
private boolean disableScreenshot() {
try {
ClassLoader classLoader = getActivity().getClassLoader();
Class appshell = classLoader.loadClass("org.mozilla.gecko.ScreenshotHandler");
Method disableScreenshotMethod = appshell.getMethod("disableScreenshot");
disableScreenshotMethod.invoke(null);
return true;
} catch (ClassNotFoundException ex) {
mAsserter.ok(false, "Error getting class", ex.toString());
} catch (IllegalAccessException ex) {
mAsserter.ok(false, "Error using field", ex.toString());
} catch (java.lang.NoSuchMethodException ex) {
mAsserter.ok(false, "Error getting method", ex.toString());
} catch (java.lang.reflect.InvocationTargetException ex) {
mAsserter.ok(false, "Error invoking method", ex.toString());
}
return false;
}
}