Bug 1151910 - Guard against ArrayIndexOutOfBoundsException in testCheck2; r=kats

This commit is contained in:
Geoff Brown 2015-04-10 14:41:37 -06:00
parent d1d443c8c3
commit 9f88317068
2 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,10 @@ public class PanningPerfAPI {
// is still executing. As values are added to this list last, we use
// this number as the canonical number of recordings.
int values = mCheckerboardAmounts.size();
if (values == 0) {
Log.w(LOGTAG, "stopCheckerboardRecording() found no checkerboard amounts!");
return mCheckerboardAmounts;
}
// The score will be the sum of all the values in mCheckerboardAmounts,
// so weight the checkerboard values by time so that frame-rate and

View File

@ -57,6 +57,7 @@ public class testCheck2 extends PixelTest {
Thread.sleep(1000);
completeness = mDriver.stopCheckerboardRecording();
} catch (Exception e) {
e.printStackTrace();
mAsserter.ok(false, "Exception while replaying events", e.toString());
}