summaryrefslogtreecommitdiffstats
path: root/tests/auto/q3popupmenu
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-09 08:16:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-09 08:18:30 (GMT)
commitda261b786f2300bf395134f5abfefde3d1d474cc (patch)
treef268fdf84bb9a8a2c616c005fb5326a624d0ccfd /tests/auto/q3popupmenu
parent22105c9952630b45fd6b50b0e3349880940a83f5 (diff)
downloadQt-da261b786f2300bf395134f5abfefde3d1d474cc.zip
Qt-da261b786f2300bf395134f5abfefde3d1d474cc.tar.gz
Qt-da261b786f2300bf395134f5abfefde3d1d474cc.tar.bz2
Try to fix tst_q3popupmenu with slow windows manager
Diffstat (limited to 'tests/auto/q3popupmenu')
-rw-r--r--tests/auto/q3popupmenu/tst_q3popupmenu.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/auto/q3popupmenu/tst_q3popupmenu.cpp b/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
index 3be416c..5585c3a 100644
--- a/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
+++ b/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
@@ -117,6 +117,8 @@ void tst_Q3PopupMenu::task177490_highlighted()
QApplication::processEvents();
#endif
Q3PopupMenu menu1;
+ //don't let the window manager move the popup while we are testing
+ menu1.setWindowFlags(Qt::X11BypassWindowManagerHint);
menu1.insertItem("Item 1");
Q3PopupMenu menu2;
@@ -133,16 +135,12 @@ void tst_Q3PopupMenu::task177490_highlighted()
QTest::mouseMove(&menu1, QPoint(x, y1));
QTest::mouseMove(&menu1, QPoint(x, y1 + 1));
- QTest::qWait(1000);
+ QTest::qWait(100);
QTest::mouseMove(&menu1, QPoint(x, y2));
QTest::mouseMove(&menu1, QPoint(x, y2 + 1));
- QTest::qWait(1000);
+ QTest::qWait(100);
- if (!menu2.isVisible())
- QEXPECT_FAIL(
- "", "expected failure due to visibilty/focus problem; to be investigated later",
- Abort);
QCOMPARE(spy.count(), 2); // one per menu item
}