summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-05 19:44:05 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-05 19:44:55 (GMT)
commitc7b091351d6fdf5fda5f38a94af24a395252249f (patch)
treed6be6ee3261dd3e899094e54faddbfdcbc73baf7 /tests/auto/qwindowsurface
parent8cac1e7fe5bfda7e876d03d1407f616f89bd74f8 (diff)
downloadQt-c7b091351d6fdf5fda5f38a94af24a395252249f.zip
Qt-c7b091351d6fdf5fda5f38a94af24a395252249f.tar.gz
Qt-c7b091351d6fdf5fda5f38a94af24a395252249f.tar.bz2
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 2490a65..25f0f07 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));