summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-20 04:04:04 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-20 04:04:04 (GMT)
commitc37a7442d298ccec251b9178a31b1f0c8f199676 (patch)
tree3262406681b7e6e4f70f3af1e066fd6303d9e9cf /tests
parentc91a5420d119ab604c7df709fcee00ae6b1b248f (diff)
downloadQt-c37a7442d298ccec251b9178a31b1f0c8f199676.zip
Qt-c37a7442d298ccec251b9178a31b1f0c8f199676.tar.gz
Qt-c37a7442d298ccec251b9178a31b1f0c8f199676.tar.bz2
Make test more stable
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index dd2f46e..b183105 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -45,6 +45,7 @@
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
#include <QtGui/qgraphicswidget.h>
+#include "../../../shared/util.h"
class tst_QDeclarativeView : public QObject
@@ -106,9 +107,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
// size update from root object
declarativeItem->setWidth(250);
declarativeItem->setHeight(350);
- qApp->processEvents();
QCOMPARE(declarativeItem->width(), 250.0);
QCOMPARE(declarativeItem->height(), 350.0);
+ QTRY_COMPARE(canvas->size(), QSize(250, 350));
QCOMPARE(canvas->size(), QSize(250, 350));
QCOMPARE(canvas->size(), canvas->sizeHint());
QCOMPARE(sceneResizedSpy.count(), 4);
@@ -134,9 +135,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
// size update from root object
declarativeItem->setWidth(80);
declarativeItem->setHeight(100);
- qApp->processEvents();
QCOMPARE(declarativeItem->width(), 80.0);
QCOMPARE(declarativeItem->height(), 100.0);
+ QTRY_COMPARE(canvas->size(), QSize(80, 100));
QCOMPARE(canvas->size(), QSize(80, 100));
QCOMPARE(canvas->size(), canvas->sizeHint());
QCOMPARE(sceneResizedSpy2.count(), 2);