summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-17 11:48:08 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-17 21:47:29 +0100
commit6f66205bacec923d989fa129796d5bd7e3786e4d (patch)
tree8ef3120c1a0007d617de4e168072506a20319d7f /tests/auto/corelib
parent24d06c8c3cdabb080f13940bd38e324659b402d0 (diff)
Add Windows-specific notation for WebDAV to QUrl.
Convert a Windows-specific WebDAV specification "//host@SSL/path" into URL's with scheme set to "webdavs" and back to local file (Windows only). Task-number: QTBUG-42346 Change-Id: I12663243848ea7b2d3f208743e837e9de14a93eb Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 5b5161e24a..6d801f75c1 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1179,6 +1179,12 @@ void tst_QUrl::toLocalFile_data()
QTest::newRow("data0") << QString::fromLatin1("file:/a.txt") << QString::fromLatin1("/a.txt");
QTest::newRow("data4") << QString::fromLatin1("file:///a.txt") << QString::fromLatin1("/a.txt");
+ QTest::newRow("data4a") << QString::fromLatin1("webdavs://somewebdavhost/somedir/somefile")
+#ifdef Q_OS_WIN // QTBUG-42346, WebDAV is visible as local file on Windows only.
+ << QString::fromLatin1("//somewebdavhost@SSL/somedir/somefile");
+#else
+ << QString();
+#endif
#ifdef Q_OS_WIN
QTest::newRow("data5") << QString::fromLatin1("file:///c:/a.txt") << QString::fromLatin1("c:/a.txt");
#else
@@ -1227,6 +1233,9 @@ void tst_QUrl::fromLocalFile_data()
QTest::newRow("data3") << QString::fromLatin1("c:/a.txt") << QString::fromLatin1("file:///c:/a.txt") << QString::fromLatin1("/c:/a.txt");
QTest::newRow("data4") << QString::fromLatin1("//somehost/somedir/somefile") << QString::fromLatin1("file://somehost/somedir/somefile")
<< QString::fromLatin1("/somedir/somefile");
+ QTest::newRow("data4a") << QString::fromLatin1("//somewebdavhost@SSL/somedir/somefile")
+ << QString::fromLatin1("webdavs://somewebdavhost/somedir/somefile")
+ << QString::fromLatin1("/somedir/somefile");
QTest::newRow("data5") << QString::fromLatin1("//somehost") << QString::fromLatin1("file://somehost")
<< QString::fromLatin1("");
QTest::newRow("data6") << QString::fromLatin1("//somehost/") << QString::fromLatin1("file://somehost/")