Bug 723619 - Update testLoad to avoid a race condition where paint finishes before we start listening. r=jmaher

This commit is contained in:
Kartikaya Gupta 2012-02-02 16:07:00 -05:00
parent 059ec61ee0
commit e24dc9d2e7

View File

@ -7,10 +7,10 @@ public class testLoad extends BaseTest {
public void testLoad() {
setTestType("mochitest");
String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
loadUrl(url);
mActions.expectPaint().blockForEvent();
getInstrumentation().waitForIdleSync();
Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
loadUrl(url);
paintExpecter.blockUntilClear(500);
int[][] painted = mDriver.getPaintedSurface();
mAsserter.ispixel(painted[0][0], 0, 255, 255, "Pixel at 0, 0");