summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-05-10 11:07:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-10 15:12:58 +0200
commit100cfb7c71b5dfb507d7b470bf60df49c36d9e40 (patch)
tree7d304d8f5c2afee023403a44a5a4bf03e19c86a4
parent31c3dec9fe1341d412830eb1163e252112f9765c (diff)
tst_qdeclarativeimage: it's OK to receive a network image in chunks
and if so, there can be more than 2 signals to update progress. Task-number: QTBUG-31065 Change-Id: I36294eb8a40c0e8d4beac29a8484260d5cfe6e73 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 859df145..d0c60043 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -575,7 +575,7 @@ void tst_qdeclarativeimage::noLoading()
QTRY_VERIFY(obj->status() == QDeclarativeImage::Ready);
QTRY_VERIFY(obj->progress() == 1.0);
QTRY_COMPARE(sourceSpy.count(), 2);
- QTRY_COMPARE(progressSpy.count(), 2);
+ QTRY_VERIFY(progressSpy.count() > 1);
QTRY_COMPARE(statusSpy.count(), 2);
// Loading remote file again - should not go through 'Loading' state.
@@ -584,7 +584,7 @@ void tst_qdeclarativeimage::noLoading()
QTRY_VERIFY(obj->status() == QDeclarativeImage::Ready);
QTRY_VERIFY(obj->progress() == 1.0);
QTRY_COMPARE(sourceSpy.count(), 4);
- QTRY_COMPARE(progressSpy.count(), 2);
+ QTRY_VERIFY(progressSpy.count() > 1);
QTRY_COMPARE(statusSpy.count(), 2);
}