summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-30 17:38:46 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-30 17:54:23 (GMT)
commite8fc662c4b5a0fa5da6f0d47e1dbb5b2640d7001 (patch)
tree17388605ed0567ffa80e65b2417d525b2468ea8f /tests/auto/qwidget
parent1827669c08580ec309ac6e13c6684e6dbcf18ec4 (diff)
downloadQt-e8fc662c4b5a0fa5da6f0d47e1dbb5b2640d7001.zip
Qt-e8fc662c4b5a0fa5da6f0d47e1dbb5b2640d7001.tar.gz
Qt-e8fc662c4b5a0fa5da6f0d47e1dbb5b2640d7001.tar.bz2
Stabilize tests on X11
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 019887d..c08d601 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -3127,7 +3127,7 @@ void tst_QWidget::saveRestoreGeometry()
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(500);
QVERIFY(widget.restoreGeometry(savedGeometry));
QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
@@ -3137,55 +3137,55 @@ void tst_QWidget::saveRestoreGeometry()
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(400);
savedGeometry = widget.saveGeometry();
geom = widget.geometry();
widget.setWindowState(widget.windowState() ^ Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
QTRY_COMPARE(widget.geometry(), geom);
QVERIFY((widget.windowState() & Qt::WindowFullScreen));
widget.setWindowState(widget.windowState() ^ Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(20);
+ QTest::qWait(120);
//Restore from Maximised
widget.move(position);
widget.resize(size);
- QTest::qWait(20);
+ QTest::qWait(10);
QTRY_COMPARE(widget.size(), size);
- QTest::qWait(200);
+ QTest::qWait(400);
savedGeometry = widget.saveGeometry();
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_VERIFY(widget.geometry() != geom);
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_COMPARE(widget.geometry(), geom);
QVERIFY(!(widget.windowState() & Qt::WindowMaximized));
//Restore to maximised
widget.setWindowState(widget.windowState() | Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
- QTest::qWait(200);
+ QTest::qWait(400);
geom = widget.geometry();
savedGeometry = widget.saveGeometry();
widget.setWindowState(widget.windowState() ^ Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowMaximized));
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_COMPARE(widget.geometry(), geom);
}
@@ -8683,7 +8683,7 @@ void tst_QWidget::setClearAndResizeMask()
QTRY_COMPARE(child.numPaintEvents, 1);
#else
// and ensure that we don't get any updates at all.
- QCOMPARE(child.numPaintEvents, 0);
+ QTRY_COMPARE(child.numPaintEvents, 0);
#endif
QCOMPARE(topLevel.numPaintEvents, 0);
@@ -8720,9 +8720,9 @@ void tst_QWidget::setClearAndResizeMask()
QTest::qWait(200);
#ifdef Q_WS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask());
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
#else
- QCOMPARE(resizeChild.paintedRegion, QRegion());
+ QTRY_COMPARE(resizeChild.paintedRegion, QRegion());
#endif
resizeChild.paintedRegion = QRegion();
@@ -8731,9 +8731,9 @@ void tst_QWidget::setClearAndResizeMask()
QTest::qWait(100);
#ifdef Q_WS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask());
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
#else
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask);
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask);
#endif
}