diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-08-27 01:46:45 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-08-27 01:46:45 (GMT) |
commit | 94d7ec29f177665e8e2a218a161df517f3ae51d5 (patch) | |
tree | 6e8d331f877e8e0aefcc8fa4d7532abae5215e60 /tests | |
parent | 93c8a38e5f4912c51c4484975ebd433bec43a0f1 (diff) | |
download | Qt-94d7ec29f177665e8e2a218a161df517f3ae51d5.zip Qt-94d7ec29f177665e8e2a218a161df517f3ae51d5.tar.gz Qt-94d7ec29f177665e8e2a218a161df517f3ae51d5.tar.bz2 |
Improve test reliability when running in parallel with other tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 896d69e..d4d8bf6 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -655,6 +655,15 @@ void tst_QDeclarativeGridView::currentIndex() gridview->setFlow(QDeclarativeGridView::TopToBottom); + qApp->setActiveWindow(canvas); +#ifdef Q_WS_X11 + // to be safe and avoid failing setFocus with window managers + qt_x11_wait_for_window_manager(canvas); +#endif + QTRY_VERIFY(canvas->hasFocus()); + QTRY_VERIFY(canvas->scene()->hasFocus()); + qApp->processEvents(); + QTest::keyClick(canvas, Qt::Key_Right); QCOMPARE(gridview->currentIndex(), 5); |