From 100cfb7c71b5dfb507d7b470bf60df49c36d9e40 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 10 May 2013 11:07:32 +0200 Subject: tst_qdeclarativeimage: it's OK to receive a network image in chunks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Liang Qi --- tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/declarative') 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); } -- cgit v1.2.3