summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-08 07:13:23 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-08 07:13:23 (GMT)
commit63e652ca7ec3b6983ebc8b0edd10199da862d53c (patch)
tree670129c275f854b56519fb027a29d58d17f017b5 /tests/auto
parent37d527f90a0ea430b4f97dd36a2048c89034ff97 (diff)
downloadQt-63e652ca7ec3b6983ebc8b0edd10199da862d53c.zip
Qt-63e652ca7ec3b6983ebc8b0edd10199da862d53c.tar.gz
Qt-63e652ca7ec3b6983ebc8b0edd10199da862d53c.tar.bz2
Quieten
expect net error
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
index 4d3ad55..5e24831 100644
--- a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
+++ b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp
@@ -65,12 +65,13 @@ void tst_qfxpixmapcache::single_data()
QTest::addColumn<QUrl>("target");
QTest::addColumn<bool>("incache");
QTest::addColumn<bool>("exists");
+ QTest::addColumn<bool>("neterror");
// File URLs are optimized
- QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true;
- QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false;
- QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true;
- QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false;
+ QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true << false;
+ QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false << false;
+ QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true << false;
+ QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false << true;
}
void tst_qfxpixmapcache::single()
@@ -78,6 +79,14 @@ void tst_qfxpixmapcache::single()
QFETCH(QUrl, target);
QFETCH(bool, incache);
QFETCH(bool, exists);
+ QFETCH(bool, neterror);
+
+ if (neterror) {
+ QString expected = "Network error loading QUrl( \""
+ +target.toString()+"\" ) \"Error downloading "
+ +target.toString()+" - server replied: Not Found\" ";
+ QTest::ignoreMessage(QtWarningMsg, expected.toLatin1());
+ }
QPixmap pixmap;
QVERIFY(pixmap.width() <= 0); // Check Qt assumption