diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-16 13:34:01 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-16 13:46:09 (GMT) |
commit | c80529584a955bea1b9e49cde0775c9ce53ce1c8 (patch) | |
tree | d801eefab2d5e9d420f5612301a1060b361ca972 /tests/auto/qtoolbar | |
parent | 51d2e7756e33ee510fdcf53d5e2ae6f96f2b1c70 (diff) | |
download | Qt-c80529584a955bea1b9e49cde0775c9ce53ce1c8.zip Qt-c80529584a955bea1b9e49cde0775c9ce53ce1c8.tar.gz Qt-c80529584a955bea1b9e49cde0775c9ce53ce1c8.tar.bz2 |
Stabilize tests
Diffstat (limited to 'tests/auto/qtoolbar')
-rw-r--r-- | tests/auto/qtoolbar/tst_qtoolbar.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qtoolbar/tst_qtoolbar.cpp b/tests/auto/qtoolbar/tst_qtoolbar.cpp index 90d7cf4..e4f317c 100644 --- a/tests/auto/qtoolbar/tst_qtoolbar.cpp +++ b/tests/auto/qtoolbar/tst_qtoolbar.cpp @@ -55,6 +55,8 @@ #include <qlineedit.h> #include <qkeysequence.h> +#include "../../shared/util.h" + //TESTED_FILES= QT_FORWARD_DECLARE_CLASS(QAction) @@ -973,12 +975,14 @@ void tst_QToolBar::accel() QSignalSpy spy(action, SIGNAL(triggered(bool))); mw.show(); - QTest::qWait(1000); + QApplication::setActiveWindow(&mw); + QTest::qWait(100); + QTRY_COMPARE(QApplication::activeWindow(), &mw); QTest::keyClick(&mw, Qt::Key_T, Qt::AltModifier); QTest::qWait(300); - QCOMPARE(spy.count(), 1); + QTRY_COMPARE(spy.count(), 1); #ifdef Q_WS_MAC qt_set_sequence_auto_mnemonic(false); #endif |