Stabilize tests
authorGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 30 Jan 2012 09:34:55 +0000 (10:34 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 06:02:38 +0000 (07:02 +0100)
Change-Id: Iafaf645787dfecfbe044dd87dbfdbb884a75040b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp

index 56347d0..795580c 100644 (file)
@@ -567,6 +567,8 @@ void tst_qquickcanvas::grab()
     canvas.resize(250, 250);
     canvas.show();
 
+    QTest::qWaitForWindowShown(&canvas);
+
     QImage content = canvas.grabFrameBuffer();
     QCOMPARE(content.width(), canvas.width());
     QCOMPARE(content.height(), canvas.height());
@@ -667,7 +669,7 @@ void tst_qquickcanvas::headless()
 
     QCOMPARE(originalContent, newContent);
 
-
+    delete canvas;
 }
 
 void tst_qquickcanvas::focusObject()