diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-09-28 09:04:48 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-02 15:45:50 (GMT) |
commit | ae0d6aa62eb86d0ea90846abf2a5fc8c210aa923 (patch) | |
tree | 8e19974256e073688e13521c091bce14dd42e8cb | |
parent | e086f429a148ce48c8a0332918fa95951025a70f (diff) | |
download | Qt-ae0d6aa62eb86d0ea90846abf2a5fc8c210aa923.zip Qt-ae0d6aa62eb86d0ea90846abf2a5fc8c210aa923.tar.gz Qt-ae0d6aa62eb86d0ea90846abf2a5fc8c210aa923.tar.bz2 |
Enable tst_qfocusevent.cpp.
Replace qWait() by qWaitForWindowShown().
Add QEXPECT_FAIL on Mac for tst_QFocusEvent::checkReason_Popup
and tst_QFocusEvent::checkReason_ActiveWindow.
Task-number: QTQAINFRA-428
Change-Id: If172085850ac1bd7cf6187b0e767b60fe46be934
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
-rw-r--r-- | tests/auto/qfocusevent/qfocusevent.pro | 2 | ||||
-rw-r--r-- | tests/auto/qfocusevent/tst_qfocusevent.cpp | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/qfocusevent/qfocusevent.pro b/tests/auto/qfocusevent/qfocusevent.pro index 7ae1ded..2323ff0 100644 --- a/tests/auto/qfocusevent/qfocusevent.pro +++ b/tests/auto/qfocusevent/qfocusevent.pro @@ -3,5 +3,3 @@ SOURCES += tst_qfocusevent.cpp contains(QT_CONFIG, qt3support): QT += qt3support - -CONFIG+=insignificant_test # QTQAINFRA-428 diff --git a/tests/auto/qfocusevent/tst_qfocusevent.cpp b/tests/auto/qfocusevent/tst_qfocusevent.cpp index 57e2fe1..3ec96aa 100644 --- a/tests/auto/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/qfocusevent/tst_qfocusevent.cpp @@ -268,10 +268,12 @@ void tst_QFocusEvent::checkReason_Popup() Q3PopupMenu* popupMenu = new Q3PopupMenu( testFocusWidget ); popupMenu->insertItem( "Test" ); popupMenu->popup( QPoint(0,0) ); - QTest::qWait(50); + QVERIFY(QTest::qWaitForWindowShown(popupMenu)); QTRY_VERIFY(childFocusWidgetOne->focusOutEventLostFocus); - +#ifdef Q_OS_MAC + QEXPECT_FAIL("", "QTQAINFRA-428", Abort); +#endif QVERIFY( childFocusWidgetOne->hasFocus() ); QVERIFY( !childFocusWidgetOne->focusInEventRecieved ); QVERIFY( childFocusWidgetOne->focusOutEventRecieved ); @@ -293,7 +295,7 @@ void tst_QFocusEvent::checkReason_Popup() QMenu* popupMenu = new QMenu( testFocusWidget ); popupMenu->addMenu( "Test" ); popupMenu->popup( QPoint(0,0) ); - QTest::qWait(50); + QVERIFY(QTest::qWaitForWindowShown(popupMenu)); QTRY_VERIFY(childFocusWidgetOne->focusOutEventLostFocus); @@ -415,6 +417,8 @@ void tst_QFocusEvent::checkReason_ActiveWindow() #if defined(Q_OS_IRIX) QEXPECT_FAIL("", "IRIX requires explicit activateWindow(), so this test does not make any sense.", Abort); +#elif defined(Q_OS_MAC) + QEXPECT_FAIL("", "QTQAINFRA-428", Abort); #endif QTRY_VERIFY(childFocusWidgetOne->focusInEventRecieved); QVERIFY(childFocusWidgetOne->focusInEventGotFocus); |