Stabilize tst_QAccessibility::actionTest
authorRohan McGovern <rohan.mcgovern@nokia.com>
Mon, 5 Mar 2012 23:48:59 +0000 (09:48 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 6 Mar 2012 00:34:50 +0000 (01:34 +0100)
show() on a window is asynchronous.  Wait for it to complete before
continuing with the test.

Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
tests/auto/other/qaccessibility/tst_qaccessibility.cpp

index b2a4b1c..4c370be 100644 (file)
@@ -777,6 +777,7 @@ void tst_QAccessibility::actionTest()
     {
     QPushButton *button = new QPushButton;
     button->show();
+    QTest::qWaitForWindowShown(button);
     button->clearFocus();
     QCOMPARE(button->hasFocus(), false);
     QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(button);