aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
index f2521e93ef..d99ed303ba 100644
--- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
+++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
@@ -1431,10 +1431,10 @@ void tst_qqmlproperty::urlHandling_data()
<< QByteArray("http://www.example.com/main%20file.qml");
QTest::newRow("preencodedName")
- << QByteArray("http://www.example.com/resources%7cmain%20file.qml")
+ << QByteArray("http://www.example.com/resources%7Cmain%20file.qml")
<< QString("http")
<< QString("/resources|main file.qml")
- << QByteArray("http://www.example.com/resources%7cmain%20file.qml");
+ << QByteArray("http://www.example.com/resources%7Cmain%20file.qml");
QTest::newRow("encodableQuery")
<< QByteArray("http://www.example.com/main.qml?type=text/qml&comment=now working?")
@@ -1443,10 +1443,10 @@ void tst_qqmlproperty::urlHandling_data()
<< QByteArray("http://www.example.com/main.qml?type=text/qml&comment=now%20working?");
QTest::newRow("preencodedQuery")
- << QByteArray("http://www.example.com/main.qml?type=text%2fqml&comment=now working%3f")
+ << QByteArray("http://www.example.com/main.qml?type=text%2Fqml&comment=now working%3F")
<< QString("http")
<< QString("/main.qml")
- << QByteArray("http://www.example.com/main.qml?type=text%2fqml&comment=now%20working%3f");
+ << QByteArray("http://www.example.com/main.qml?type=text%2Fqml&comment=now%20working%3F");
QTest::newRow("encodableFragment")
<< QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000|volume+50%")
@@ -1454,11 +1454,11 @@ void tst_qqmlproperty::urlHandling_data()
<< QString("/main.qml")
<< QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%7Cvolume+50%25");
- QTest::newRow("preencodedFragment")
- << QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%7cvolume%2b50%")
+ QTest::newRow("improperlyEncodedFragment")
+ << QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%7Cvolume%2B50%")
<< QString("http")
<< QString("/main.qml")
- << QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%7cvolume%2b50%25");
+ << QByteArray("http://www.example.com/main.qml?type=text/qml#start+30000%257Cvolume%252B50%25");
}
void tst_qqmlproperty::urlHandling()
@@ -1480,6 +1480,7 @@ void tst_qqmlproperty::urlHandling()
QCOMPARE(byteArrayResult.scheme(), scheme);
QCOMPARE(byteArrayResult.path(), path);
+ QCOMPARE(byteArrayResult.toString(QUrl::FullyEncoded), QString::fromUtf8(encoded));
QCOMPARE(byteArrayResult.toEncoded(), encoded);
}
@@ -1493,6 +1494,7 @@ void tst_qqmlproperty::urlHandling()
QCOMPARE(stringResult.scheme(), scheme);
QCOMPARE(stringResult.path(), path);
+ QCOMPARE(stringResult.toString(QUrl::FullyEncoded), QString::fromUtf8(encoded));
QCOMPARE(stringResult.toEncoded(), encoded);
}
}