Fix unstable test_paint test case
authorCharles Yin <yinyunqiao@gmail.com>
Mon, 4 Jun 2012 13:03:58 +0000 (23:03 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 5 Jun 2012 00:00:30 +0000 (02:00 +0200)
Change-Id: I11c79b3f014d82b113429bd17b2d5473fdcebf1d
Task-number: QTBUG-25859
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml
tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro

index 683d452..f13039a 100644 (file)
@@ -178,7 +178,9 @@ CanvasTestCase {
        verify(c);
        var ctx = c.getContext("2d");
        tryCompare(c, "availableChangedCount", 1);
-
+       //scene graph could be available immediately
+       //in this case, we force waiting a short while until the init paint finished
+       tryCompare(c, "paintedCount", 1);
        ctx.fillRect(0, 0, c.width, c.height);
        c.toDataURL();
        tryCompare(c, "paintedCount", 2);
@@ -228,4 +230,5 @@ CanvasTestCase {
        c.destroy();
 
   }
-}
\ No newline at end of file
+}
+
index f109d37..e2a51d2 100644 (file)
@@ -3,7 +3,6 @@ TEMPLATE=app
 TARGET=tst_qquickcanvasitem
 
 CONFIG += warn_on qmltestcase
-CONFIG += insignificant_test  #QTBUG-25859
 SOURCES += tst_qquickcanvasitem.cpp
 
 TESTDATA = data/*