summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-01 08:03:26 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-01 08:11:51 (GMT)
commit91b58202c089ea8f4e150717cee8dbc40b8f903c (patch)
treed23fd5c1e0cd38899569f016f516aca15b2c15ec /tests
parentac36357a8aa2a33491d1c308ade0a63a89a6590e (diff)
downloadQt-91b58202c089ea8f4e150717cee8dbc40b8f903c.zip
Qt-91b58202c089ea8f4e150717cee8dbc40b8f903c.tar.gz
Qt-91b58202c089ea8f4e150717cee8dbc40b8f903c.tar.bz2
Stabilize tests on X11
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp4
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp3
-rw-r--r--tests/auto/qmdiarea/tst_qmdiarea.cpp1
-rw-r--r--tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp1
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp3
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp2
6 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 6e60516..00fae2f 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1301,12 +1301,12 @@ void tst_QGraphicsProxyWidget::paintEvent()
scene.addItem(&proxy);
//make sure we flush all the paint events
- QApplication::processEvents();
+ QTest::qWait(70);
QTRY_VERIFY(proxy.paintCount > 1);
proxy.paintCount = 0;
w->update();
- QApplication::processEvents();
+ QTest::qWait(30);
QTRY_COMPARE(proxy.paintCount, 1); //the widget should have been painted now
}
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 864076f..90477f0 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1357,8 +1357,9 @@ void tst_QGraphicsScene::removeItem()
QVERIFY(!hoverItem->isHovered);
{
- QTest::mouseMove(view.viewport(), view.mapFromScene(hoverItem->scenePos()), Qt::NoButton);
QTest::qWait(250);
+ QTest::mouseMove(view.viewport(), view.mapFromScene(hoverItem->scenePos()), Qt::NoButton);
+ QTest::qWait(10);
QMouseEvent moveEvent(QEvent::MouseMove, view.mapFromScene(hoverItem->scenePos()), Qt::NoButton, 0, 0);
QApplication::sendEvent(view.viewport(), &moveEvent);
}
diff --git a/tests/auto/qmdiarea/tst_qmdiarea.cpp b/tests/auto/qmdiarea/tst_qmdiarea.cpp
index b110114..725c31e 100644
--- a/tests/auto/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/qmdiarea/tst_qmdiarea.cpp
@@ -468,6 +468,7 @@ void tst_QMdiArea::subWindowActivated2()
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&mdiArea);
#endif
+ QTest::qWait(100);
QTRY_COMPARE(spy.count(), 5);
QCOMPARE(mdiArea.activeSubWindow(), mdiArea.subWindowList().back());
diff --git a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
index b897d8f..2d70bef 100644
--- a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -1065,6 +1065,7 @@ void tst_QMdiSubWindow::setSystemMenu()
qApp->setLayoutDirection(Qt::RightToLeft);
qApp->processEvents();
mainWindow.updateGeometry();
+ QTest::qWait(150);
subWindow->showSystemMenu();
QTest::qWait(250);
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index 5607fbd..12858d7 100644
--- a/tests/auto/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp
@@ -714,7 +714,8 @@ void tst_QMessageBox::setInformativeText()
msgbox.setInformativeText(itext);
msgbox.show();
QCOMPARE(msgbox.informativeText(), itext);
- QVERIFY(msgbox.width() > 200); //verify it's big enough (task181688)
+ QVERIFY2(msgbox.width() > 200, //verify it's big enough (task181688)
+ qPrintable(QString("%1 > 200").arg(msgbox.width())));
}
void tst_QMessageBox::iconPixmap()
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index c08d601..94e67a4 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8196,7 +8196,7 @@ void tst_QWidget::moveInResizeEvent()
testWidget.setGeometry(50, 50, 200, 200);
testWidget.show();
QTest::qWaitForWindowShown(&testWidget);
- QTest::qWait(10);
+ QTest::qWait(120);
QRect expectedGeometry(100,100, 100, 100);
QTRY_COMPARE(testWidget.geometry(), expectedGeometry);