summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-09 13:20:41 +0300
committerJanne Anttila <janne.anttila@digia.com>2009-09-09 13:20:41 +0300
commit94bdab6ac2b47f4e4301dff83f43e1b68d587a61 (patch)
tree34089f7b4b7c532ab0929ddf7d9d9c6ec3c7c284 /tests/auto
parent6fd22a76e8e687cbe9b78b8810a7bedef38c9995 (diff)
parent5a242e8a8cd1c23991da3df288c4e91b06532d43 (diff)
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/q3popupmenu/tst_q3popupmenu.cpp10
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp4
-rw-r--r--tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp1
3 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/q3popupmenu/tst_q3popupmenu.cpp b/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
index 3be416c284..5585c3abf1 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
}
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index b52cb7d1a1..bb0ea70f3e 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -2173,14 +2173,12 @@ void tst_QGraphicsView::viewportUpdateMode()
qt_x11_wait_for_window_manager(&view);
#endif
QTest::qWait(50);
+ QTRY_VERIFY(!view.lastUpdateRegions.isEmpty());
view.lastUpdateRegions.clear();
// Issue two scene updates.
scene.update(QRectF(0, 0, 10, 10));
scene.update(QRectF(20, 0, 10, 10));
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&view);
-#endif
QTest::qWait(50);
// The view gets two updates for the update scene updates.
diff --git a/tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp b/tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp
index 3a2e79bfe7..014074acdf 100644
--- a/tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp
+++ b/tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp
@@ -239,6 +239,7 @@ void tst_QWSWindowSystem::windowOpacity()
QColor(255, 255, 255, 0));
w2.setPalette(palette);
QApplication::processEvents();
+ QApplication::processEvents();
QCOMPARE(win1->allocatedRegion(), QRegion(rect));
QCOMPARE(win2->allocatedRegion(), QRegion(rect));
VERIFY_COLOR(rect, w1.color());