From: Bea Lam Date: Wed, 4 Jan 2012 23:36:31 +0000 (+1000) Subject: Make tst_QQuickListView::margins() more reliable X-Git-Tag: qt-v5.0.0-alpha1~752 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7723cba1fb833924c5ae63dae549d8d60c14299;p=profile%2Fivi%2Fqtdeclarative.git Make tst_QQuickListView::margins() more reliable Change-Id: Ib66f5717316b4c8d71dbef408afbbb9b0698ad7a Reviewed-by: Martin Jones --- diff --git a/tests/auto/qtquick2/qquicklistview/tst_qquicklistview.cpp b/tests/auto/qtquick2/qquicklistview/tst_qquicklistview.cpp index 73b4d03..075c0c4 100644 --- a/tests/auto/qtquick2/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/qtquick2/qquicklistview/tst_qquicklistview.cpp @@ -3994,8 +3994,9 @@ void tst_QQuickListView::margins() // and yOrigin is updated listview->setContentY(100); model.removeItem(1); - QTest::qWait(100); + QTRY_COMPARE(listview->count(), model.count()); listview->setContentY(-50); + QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false); listview->returnToBounds(); QCOMPARE(listview->yOrigin(), 20.); QTRY_COMPARE(listview->contentY(), -10.);