summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-05-05 14:51:41 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-05-05 15:05:48 (GMT)
commitebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4 (patch)
tree94218946b3f0663d4eeca47c550b7b836867e6c7 /tests/auto/qnetworkreply
parenta2f797b52c4274a62a7cf1f0939aca1429afe211 (diff)
downloadQt-ebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4.zip
Qt-ebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4.tar.gz
Qt-ebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4.tar.bz2
Use QUrl::isLocalFile and fix the scheme checking in local URLs.
RFC 3986 requires that schemes be compared case-insensitively, so "QRC:/" is allowed for Qt resources. Also document the use of file engines and search paths. Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 9d942bf..c4d458f 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -1166,6 +1166,12 @@ void tst_QNetworkReply::getErrors_data()
QTest::addColumn<int>("httpStatusCode");
QTest::addColumn<bool>("dataIsEmpty");
+ // empties
+ QTest::newRow("empty-url") << QString() << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
+ QTest::newRow("empty-scheme-host") << SRCDIR "/rfc3252.txt" << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
+ QTest::newRow("empty-scheme") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri"
+ << int(QNetworkReply::ProtocolUnknownError) << 0 << true;
+
// file: errors
QTest::newRow("file-host") << "file://this-host-doesnt-exist.troll.no/foo.txt"
#if !defined Q_OS_WIN