summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-06 10:36:14 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-06 10:39:07 (GMT)
commite3f3ced70f80369439200b7d7bc3e4e11222c81f (patch)
tree9ff9e0c73bab7f9febd47948cdca3747ad09482e /tests
parent8fa64f0311af6373a8c258df390d39cc98ca8b2f (diff)
downloadQt-e3f3ced70f80369439200b7d7bc3e4e11222c81f.zip
Qt-e3f3ced70f80369439200b7d7bc3e4e11222c81f.tar.gz
Qt-e3f3ced70f80369439200b7d7bc3e4e11222c81f.tar.bz2
task256322_highlight() failed due to lack of delays before QVERIFYs.
Last QVERIFY still failing. Reviewed-by: olivier
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp
index 1245de1..67e088b 100644
--- a/tests/auto/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/qmenubar/tst_qmenubar.cpp
@@ -59,6 +59,8 @@
#include <qobject.h>
+#include "../../shared/util.h"
+
QT_FORWARD_DECLARE_CLASS(QMainWindow)
#include <qmenubar.h>
@@ -1536,25 +1538,26 @@ void tst_QMenuBar::task256322_highlight()
QAction *nothing = win.menuBar()->addAction("nothing");
win.show();
+ QTest::qWait(50);
+ QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(file).center());
QTest::mouseClick(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file).center());
- QVERIFY(menu.isVisible());
+ QTRY_VERIFY(menu.isVisible());
QVERIFY(!menu2.isVisible());
QCOMPARE(win.menuBar()->activeAction(), file);
QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(file2).center());
- QVERIFY(!menu.isVisible());
+ QTRY_VERIFY(!menu.isVisible());
QVERIFY(menu2.isVisible());
QCOMPARE(win.menuBar()->activeAction(), file2);
QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(nothing).center());
+ QTRY_VERIFY(!menu2.isVisible());
QVERIFY(!menu.isVisible());
- QVERIFY(!menu2.isVisible());
QCOMPARE(win.menuBar()->activeAction(), nothing);
QTest::mouseMove(&win, win.menuBar()->geometry().bottomLeft() + QPoint(1,1));
-
- QVERIFY(!menu.isVisible());
+ QTRY_VERIFY(!menu.isVisible());
QVERIFY(!menu2.isVisible());
QVERIFY(!win.menuBar()->activeAction());
}