tst_qaccessibility: Introduce QTRY_VERIFY to menuTest().

Fixes failures on Windows 8.1.

Task-number: QTBUG-37822
Change-Id: I30460f430e2249555c4e857237e27aa9b03dfa1b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
Friedemann Kleint 2014-03-28 11:05:00 +01:00 committed by The Qt Project
parent 27fa02e29d
commit 0fadbc7ed9

View File

@ -1415,19 +1415,19 @@ void tst_QAccessibility::menuTest()
iFile->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
if(menuFade)
QTest::qWait(menuFadeDelay);
QVERIFY(file->isVisible() && !edit->isVisible() && !help->isVisible());
QTRY_VERIFY(file->isVisible() && !edit->isVisible() && !help->isVisible());
iEdit->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
if(menuFade)
QTest::qWait(menuFadeDelay);
QVERIFY(!file->isVisible() && edit->isVisible() && !help->isVisible());
QTRY_VERIFY(!file->isVisible() && edit->isVisible() && !help->isVisible());
iHelp->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
if(menuFade)
QTest::qWait(menuFadeDelay);
QVERIFY(!file->isVisible() && !edit->isVisible() && help->isVisible());
QTRY_VERIFY(!file->isVisible() && !edit->isVisible() && help->isVisible());
iAction->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
if(menuFade)
QTest::qWait(menuFadeDelay);
QVERIFY(!file->isVisible() && !edit->isVisible() && !help->isVisible());
QTRY_VERIFY(!file->isVisible() && !edit->isVisible() && !help->isVisible());
QVERIFY(interface->actionInterface());
QCOMPARE(interface->actionInterface()->actionNames(), QStringList());
@ -1500,8 +1500,8 @@ void tst_QAccessibility::menuTest()
iFile->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
iFileNew->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
QVERIFY(file->isVisible());
QVERIFY(fileNew->isVisible());
QTRY_VERIFY(file->isVisible());
QTRY_VERIFY(fileNew->isVisible());
QVERIFY(!edit->isVisible());
QVERIFY(!help->isVisible());