summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-18 13:45:33 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-21 18:47:58 +0100
commit0097d2daba0d4482090705dee6465faa0967b7d1 (patch)
tree430e1784a545c93dcf1870a1a8d4687d46bcda43 /tests
parentac22fa8a33472cbdd85ef312c436442a93959ab3 (diff)
Removed commented test data from QUrl test.
The removed test data is invalid for the toString() test function -- QUrl::toString() won't eliminate relative paths from URL's, you need to call QUrl::resolved() to do that. Add this test data to the test for QUrl::resolved(), as the existing tests don't seem to cover the case of a complete URL containing a relative path. Change-Id: Idb0f4eac9cc75258a8e17f10fa95ddb75f01d470 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index b435d440b7..c5e4d87908 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -878,12 +878,6 @@ void tst_QUrl::toString_data()
<< uint(QUrl::None)
<< QString::fromLatin1("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged");
- /*
- QTest::newRow("data19") << QString::fromLatin1("http://andreas:hemmelig@www.vg.no/a/../?my=query&your=query#yougotfragged")
- << uint(QUrl::None)
- << QString::fromLatin1("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged");
- */
-
QTest::newRow("nopath_task31320") << QString::fromLatin1("host://protocol")
<< uint(QUrl::None)
<< QString::fromLatin1("host://protocol");
@@ -3200,7 +3194,6 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const
<< QUrl::fromEncoded("http://example.com/")
<< QUrl::fromEncoded("http://example.com/");
-
QTest::newRow("Absolute file:/// against data scheme.")
<< QUrl::fromEncoded("file:///foo/")
<< QUrl::fromEncoded("data:application/xml,%3Ce%2F%3E")
@@ -3210,6 +3203,11 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const
<< QUrl::fromEncoded("http://www.foo.com:8080/")
<< QUrl::fromEncoded("newfile.html")
<< QUrl::fromEncoded("http://www.foo.com:8080/newfile.html");
+
+ QTest::newRow("Resolve with relative path")
+ << QUrl::fromEncoded("http://example.com/")
+ << QUrl::fromEncoded("http://andreas:hemmelig@www.vg.no/a/../?my=query&your=query#yougotfragged")
+ << QUrl::fromEncoded("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged");
}
void tst_QUrl::taskQTBUG_6962()