summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/util
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-03-11 14:50:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 17:17:54 +0100
commitcc58912acd497ec0b75ae63e987f6bd66b35f86d (patch)
tree62b07a4f8b234eb20138a18aa797e057e791f681 /tests/auto/widgets/util
parentd89fe1c7b386db3335ade352d3b9d12953e20302 (diff)
Stabilize tst_qscroller on Windows.
Change-Id: I2331f140e19ed6a2f78e48c91c653f483d8f3347 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/widgets/util')
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
index fa0db59311..a53da5275c 100644
--- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
+++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
@@ -153,7 +153,6 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint
QCOMPARE( s1->state(), QScroller::Inactive );
QScrollerProperties sp1 = QScroller::scroller(sw)->scrollerProperties();
- int fps = 60;
QTouchEvent::TouchPoint rawTouchPoint;
rawTouchPoint.setId(0);
@@ -192,8 +191,7 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint
QCOMPARE( sw->receivedPrepare, true );
- QTest::qWait(1000 / fps * 2); // wait until the first scroll move
- QCOMPARE( sw->receivedFirst, true );
+ QTRY_COMPARE( sw->receivedFirst, true );
QCOMPARE( sw->receivedScroll, true );
QCOMPARE( sw->receivedOvershoot, false );
@@ -406,7 +404,7 @@ void tst_QScroller::scroll()
QScroller *s1 = QScroller::scroller(sw);
kineticScroll(sw, QPointF(500, 500), QPoint(0, 0), QPoint(100, 100), QPoint(200, 200));
// now we should be scrolling
- QCOMPARE( s1->state(), QScroller::Scrolling );
+ QTRY_COMPARE( s1->state(), QScroller::Scrolling );
// wait until finished, check that no further first scroll is send
sw->receivedFirst = false;