Attempt to stabilize QMenu auto tests

Change-Id: I7d8260570a280182990d78e07d696aa4b46e1747
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
This commit is contained in:
J-P Nurmi 2012-09-14 11:18:19 +02:00 committed by Qt by Nokia
parent 83b1ed1ea8
commit 7329ad3ee5

View File

@ -556,7 +556,7 @@ void tst_QMenu::tearOff()
widget.activateWindow();
QVERIFY(QTest::qWaitForWindowActive(&widget));
menu->popup(QPoint(0,0));
QTest::qWait(50);
QVERIFY(QTest::qWaitForWindowActive(menu));
QVERIFY(!menu->isTearOffMenuVisible());
QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10);
@ -791,12 +791,12 @@ void tst_QMenu::task258920_mouseBorder()
QTest::qWait(30);
QTest::mouseMove(&menu, actionRect.center() + QPoint(10, 0));
QTest::qWait(30);
QCOMPARE(action, menu.activeAction());
QTRY_COMPARE(action, menu.activeAction());
menu.painted = false;
QTest::mouseMove(&menu, QPoint(actionRect.center().x(), actionRect.bottom() + 1));
QTest::qWait(30);
QCOMPARE(static_cast<QAction*>(0), menu.activeAction());
QVERIFY(menu.painted);
QTRY_COMPARE(static_cast<QAction*>(0), menu.activeAction());
QTRY_VERIFY(menu.painted);
}
void tst_QMenu::setFixedWidth()