diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 13:28:42 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 13:29:44 (GMT) |
commit | ef4276442f8421771c827ad4e29bc69baf24de2d (patch) | |
tree | a2344388d7952dca17cab0642717d04698864b2a /tests | |
parent | 7e0c0d684a42371c3597441a2488e05ce520f91e (diff) | |
download | Qt-ef4276442f8421771c827ad4e29bc69baf24de2d.zip Qt-ef4276442f8421771c827ad4e29bc69baf24de2d.tar.gz Qt-ef4276442f8421771c827ad4e29bc69baf24de2d.tar.bz2 |
Remove the fromUserInput implementation and tests.
Reviewed-by: Trust Me
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qurl/tst_qurl.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 72c13bf..178e5e5 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -3679,65 +3679,10 @@ void tst_QUrl::binaryData() void tst_QUrl::fromUserInput_data() { - QTest::addColumn<QString>("string"); - QTest::addColumn<QUrl>("url"); - - // Null - QTest::newRow("null") << QString() << QUrl(); - - // File - QDirIterator it(QDir::homePath()); - QString fileString; - int c = 0; - while (it.hasNext()) { - it.next(); - QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.filePath() << QUrl::fromLocalFile(it.filePath()); - } - - // basic latin1 - QTest::newRow("unicode-0") << QString::fromUtf8("\xC3\xA5.com/") << QUrl::fromEncoded(QString::fromUtf8("http://\xC3\xA5.com/").toUtf8(), QUrl::TolerantMode); - // unicode - QTest::newRow("unicode-1") << QString::fromUtf8("\xCE\xBB.com/") << QUrl::fromEncoded(QString::fromUtf8("http://\xCE\xBB.com/").toUtf8(), QUrl::TolerantMode); - - // no scheme - QTest::newRow("add scheme-0") << "webkit.org" << QUrl("http://webkit.org"); - QTest::newRow("add scheme-1") << "www.webkit.org" << QUrl("http://www.webkit.org"); - QTest::newRow("add scheme-2") << "ftp.webkit.org" << QUrl("ftp://ftp.webkit.org"); - QTest::newRow("add scheme-3") << "webkit" << QUrl("webkit"); - - // QUrl's tolerant parser should already handle this - QTest::newRow("not-encoded-0") << "http://webkit.org/test page.html" << QUrl("http://webkit.org/test%20page.html"); - - // Make sure the :80, i.e. port doesn't screw anything up - QUrl portUrl("http://webkit.org"); - portUrl.setPort(80); - QTest::newRow("port-0") << "webkit.org:80" << portUrl; - QTest::newRow("port-1") << "http://webkit.org:80" << portUrl; - - // mailto doesn't have a ://, but is valid - QUrl mailto("somebody@somewhere.net"); - mailto.setScheme("mailto"); - QTest::newRow("mailto") << "mailto:somebody@somewhere.net" << mailto; - - // misc - QTest::newRow("localhost-0") << "localhost" << QUrl("http://localhost"); - QTest::newRow("localhost-1") << "localhost:80" << QUrl("http://localhost:80"); - QTest::newRow("spaces-0") << " http://webkit.org/test page.html " << QUrl("http://webkit.org/test%20page.html"); - QTest::newRow("trash-0") << "webkit.org/test?someData=42%&someOtherData=abcde#anchor" << QUrl::fromEncoded("http://webkit.org/test?someData=42%25&someOtherData=abcde#anchor"); - - // FYI: The scheme in the resulting url user - QUrl authUrl("user:pass@domain.com"); - QTest::newRow("misc-1") << "user:pass@domain.com" << authUrl; } -// public static QUrl guessUrlFromString(QString const& string) void tst_QUrl::fromUserInput() { - QFETCH(QString, string); - QFETCH(QUrl, url); - - QUrl guessedUrl = QUrl::fromUserInput(string); - QCOMPARE(guessedUrl, url); } void tst_QUrl::task_199967() |