aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2011-05-25 13:23:30 +1000
committerYann Bodson <yann.bodson@nokia.com>2011-05-25 13:23:30 +1000
commit62fcdaf08a015fd493de3ee446934904e765f40d (patch)
treee479e69eb2922782974242d2d8153b3770355c26 /tests
parentdc641323e2f82873908aa55ce3bd4ac46f2112c5 (diff)
Fix QSGImage autotest.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qsgimage/tst_qsgimage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp b/tests/auto/declarative/qsgimage/tst_qsgimage.cpp
index a8dadf0444..1ddaa623aa 100644
--- a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp
+++ b/tests/auto/declarative/qsgimage/tst_qsgimage.cpp
@@ -498,7 +498,7 @@ void tst_qsgimage::noLoading()
server.serveDirectory(SRCDIR "/data");
server.addRedirect("oldcolors.png", SERVER_ADDR "/colors.png");
- QString componentStr = "import QtQuick 2.0\nImage { source: srcImage }";
+ QString componentStr = "import QtQuick 2.0\nImage { source: srcImage; cache: true }";
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/heart.png"));
QDeclarativeComponent component(&engine);
@@ -512,7 +512,7 @@ void tst_qsgimage::noLoading()
QSignalSpy statusSpy(obj, SIGNAL(statusChanged(QSGImageBase::Status)));
// Loading local file
- ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
+ ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/green.png"));
QTRY_VERIFY(obj->status() == QSGImage::Ready);
QTRY_VERIFY(obj->progress() == 1.0);
QTRY_COMPARE(sourceSpy.count(), 1);
@@ -520,7 +520,7 @@ void tst_qsgimage::noLoading()
QTRY_COMPARE(statusSpy.count(), 0);
// Loading remote file
- ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/heart200.png");
+ ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/rect.png");
QTRY_VERIFY(obj->status() == QSGImage::Loading);
QTRY_VERIFY(obj->progress() == 0.0);
QTRY_VERIFY(obj->status() == QSGImage::Ready);
@@ -530,8 +530,8 @@ void tst_qsgimage::noLoading()
QTRY_COMPARE(statusSpy.count(), 2);
// Loading remote file again - should not go through 'Loading' state.
- ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
- ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/heart200.png");
+ ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/green.png"));
+ ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/rect.png");
QTRY_VERIFY(obj->status() == QSGImage::Ready);
QTRY_VERIFY(obj->progress() == 1.0);
QTRY_COMPARE(sourceSpy.count(), 4);