diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-02 17:17:41 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-02 17:19:21 (GMT) |
commit | e3fa7e2f0fd8f69d3de96af9ba0b868bd3ccc07c (patch) | |
tree | 2b29d9836d9114bdb363c1f693411c0cc1c1a539 | |
parent | 0981f27d76436f8058d8534b7454777910922ee0 (diff) | |
download | Qt-e3fa7e2f0fd8f69d3de96af9ba0b868bd3ccc07c.zip Qt-e3fa7e2f0fd8f69d3de96af9ba0b868bd3ccc07c.tar.gz Qt-e3fa7e2f0fd8f69d3de96af9ba0b868bd3ccc07c.tar.bz2 |
Stablilize autotests on X11
-rw-r--r-- | tests/auto/qmdiarea/tst_qmdiarea.cpp | 10 | ||||
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 11 |
2 files changed, 14 insertions, 7 deletions
diff --git a/tests/auto/qmdiarea/tst_qmdiarea.cpp b/tests/auto/qmdiarea/tst_qmdiarea.cpp index 725c31e..a5b3848 100644 --- a/tests/auto/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/qmdiarea/tst_qmdiarea.cpp @@ -1776,9 +1776,9 @@ void tst_QMdiArea::tileSubWindows() #endif qApp->processEvents(); - QVERIFY(workspace.size() != QSize(150, 150)); - QVERIFY(!vBar->isVisible()); - QVERIFY(!hBar->isVisible()); + QTRY_VERIFY(workspace.size() != QSize(150, 150)); + QTRY_VERIFY(!vBar->isVisible()); + QTRY_VERIFY(!hBar->isVisible()); } void tst_QMdiArea::cascadeAndTileSubWindows() @@ -1853,6 +1853,7 @@ void tst_QMdiArea::resizeMaximizedChildWindows() #if defined(Q_WS_X11) qt_x11_wait_for_window_manager(&workspace); #endif + QTest::qWait(100); workspace.resize(startSize, startSize); workspace.setOption(QMdiArea::DontMaximizeSubWindowOnActivation); QSize workspaceSize = workspace.size(); @@ -1865,6 +1866,7 @@ void tst_QMdiArea::resizeMaximizedChildWindows() windows.append(window); qApp->processEvents(); window->showMaximized(); + QTest::qWait(100); QVERIFY(window->isMaximized()); QSize windowSize = window->size(); QVERIFY(windowSize.isValid()); @@ -1874,7 +1876,7 @@ void tst_QMdiArea::resizeMaximizedChildWindows() QTest::qWait(100); qApp->processEvents(); QTRY_COMPARE(workspace.size(), workspaceSize + QSize(increment, increment)); - QCOMPARE(window->size(), windowSize + QSize(increment, increment)); + QTRY_COMPARE(window->size(), windowSize + QSize(increment, increment)); workspaceSize = workspace.size(); } diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index e31d621..b0a26c2 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -5498,10 +5498,11 @@ void tst_QWidget::multipleToplevelFocusCheck() QTest::qWait(100); - w1.activateWindow(); QApplication::setActiveWindow(&w1); + w1.activateWindow(); QApplication::processEvents(); QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&w1)); + QTest::qWait(50); QTest::mouseDClick(&w1, Qt::LeftButton); QTRY_COMPARE(QApplication::focusWidget(), static_cast<QWidget *>(w1.edit)); @@ -7470,10 +7471,11 @@ void tst_QWidget::updateWhileMinimized() QTest::qWaitForWindowShown(&widget); QApplication::processEvents(); QTRY_VERIFY(widget.numPaintEvents > 0); + QTest::qWait(50); // Minimize window. widget.showMinimized(); - QTest::qWait(30); + QTest::qWait(70); widget.reset(); @@ -8174,7 +8176,7 @@ public: static bool firstTime = true; if (firstTime) - QTimer::singleShot(100, this, SLOT(resizeMe())); + QTimer::singleShot(70, this, SLOT(resizeMe())); firstTime = false; } @@ -8709,6 +8711,7 @@ void tst_QWidget::setClearAndResizeMask() // Disable the size grip on the Mac; otherwise it'll be included when grabbing the window. resizeParent.setFixedSize(resizeParent.size()); resizeChild.show(); + QTest::qWait(30); resizeChild.paintedRegion = QRegion(); QTimer::singleShot(100, &resizeChild, SLOT(shrinkMask())); @@ -9198,6 +9201,7 @@ void tst_QWidget::focusWidget_task254563() void tst_QWidget::destroyBackingStore() { +#ifdef QT_BUILD_INTERNAL UpdateWidget w; w.reset(); w.show(); @@ -9222,6 +9226,7 @@ void tst_QWidget::destroyBackingStore() w.update(); QApplication::processEvents(); QCOMPARE(w.numPaintEvents, 2); +#endif } void tst_QWidget::rectOutsideCoordinatesLimit_task144779() |