summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-05 21:44:05 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-05 21:44:55 +0200
commitc7b091351d6fdf5fda5f38a94af24a395252249f (patch)
treed6be6ee3261dd3e899094e54faddbfdcbc73baf7 /tests/auto/qwindowsurface
parent8cac1e7fe5bfda7e876d03d1407f616f89bd74f8 (diff)
Stabilize tests on X11
Diffstat (limited to 'tests/auto/qwindowsurface')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index 2490a65d9f..25f0f07d74 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -51,6 +51,9 @@
#include <QDesktopWidget>
#include <QX11Info>
+
+#include "../../shared/util.h"
+
class tst_QWindowSurface : public QObject
{
Q_OBJECT
@@ -238,9 +241,9 @@ void tst_QWindowSurface::grabWidget()
parentWidget.show();
QTest::qWaitForWindowShown(&parentWidget);
- QTest::qWait(220);
-
- QPixmap parentPixmap = parentWidget.windowSurface()->grabWidget(&parentWidget);
+ QPixmap parentPixmap;
+ QTRY_COMPARE((parentPixmap = parentWidget.windowSurface()->grabWidget(&parentWidget)).size(),
+ QSize(300,300));
QPixmap childPixmap = childWidget.windowSurface()->grabWidget(&childWidget);
QPixmap babyPixmap = babyWidget.windowSurface()->grabWidget(&babyWidget);
QPixmap parentSubPixmap = parentWidget.windowSurface()->grabWidget(&parentWidget, QRect(25, 25, 100, 100));