summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-08-12 16:09:25 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2009-08-12 16:09:25 +1000
commit96b6a3c9cd84dbd90bd1fac84a077c01062c5871 (patch)
tree27985ab4d9f2b8b309d0cf48bd3627a545e28938 /tests/auto/qurl
parente6b6dfb42ea4b649b52df9d17628bfdf3f9d29e4 (diff)
Update obsolete URL's in code and docs.
Reviewed-by: Trust Me
Diffstat (limited to 'tests/auto/qurl')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 2fd65e704c..5d909d8286 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -283,20 +283,20 @@ void tst_QUrl::constructing()
QCOMPARE(url.fragment(), QString::fromLatin1("top"));
url.setScheme("http");
- url.setHost("www.trolltech.com");
+ url.setHost("qt.nokia.com");
QCOMPARE(url.toString(),
- QString::fromLatin1("http://www.trolltech.com?type>login/name>åge nissemannsen"
+ QString::fromLatin1("http://qt.nokia.com?type>login/name>åge nissemannsen"
"/ole&du>anne+jørgen=sant/prosent>%#top"));
- QUrl justHost("www.trolltech.com");
+ QUrl justHost("qt.nokia.com");
QVERIFY(!justHost.isEmpty());
QVERIFY(justHost.host().isEmpty());
- QCOMPARE(justHost.path(), QString::fromLatin1("www.trolltech.com"));
+ QCOMPARE(justHost.path(), QString::fromLatin1("qt.nokia.com"));
- QUrl hostWithSlashes("//www.trolltech.com");
+ QUrl hostWithSlashes("//qt.nokia.com");
QVERIFY(hostWithSlashes.path().isEmpty());
- QCOMPARE(hostWithSlashes.host(), QString::fromLatin1("www.trolltech.com"));
+ QCOMPARE(hostWithSlashes.host(), QString::fromLatin1("qt.nokia.com"));
QUrl withHashInPath;
@@ -317,7 +317,7 @@ void tst_QUrl::constructing()
void tst_QUrl::assignment()
{
- QUrl url("http://www.trolltech.com/");
+ QUrl url("http://qt.nokia.com/");
QVERIFY(url.isValid());
QUrl copy;
@@ -328,10 +328,10 @@ void tst_QUrl::assignment()
void tst_QUrl::comparison()
{
- QUrl url1("http://www.trolltech.com/");
+ QUrl url1("http://qt.nokia.com/");
QVERIFY(url1.isValid());
- QUrl url2("http://www.trolltech.com/");
+ QUrl url2("http://qt.nokia.com/");
QVERIFY(url2.isValid());
QVERIFY(url1 == url2);
@@ -359,7 +359,7 @@ void tst_QUrl::comparison()
void tst_QUrl::copying()
{
- QUrl url("http://www.trolltech.com/");
+ QUrl url("http://qt.nokia.com/");
QVERIFY(url.isValid());
QUrl copy(url);
@@ -1654,9 +1654,9 @@ void tst_QUrl::toString_constructed_data()
QString n("");
- QTest::newRow("data1") << n << n << n << QString::fromLatin1("www.trolltech.com") << -1 << QString::fromLatin1("index.html")
- << QByteArray() << n << QString::fromLatin1("//www.trolltech.com/index.html")
- << QByteArray("//www.trolltech.com/index.html");
+ QTest::newRow("data1") << n << n << n << QString::fromLatin1("qt.nokia.com") << -1 << QString::fromLatin1("index.html")
+ << QByteArray() << n << QString::fromLatin1("//qt.nokia.com/index.html")
+ << QByteArray("//qt.nokia.com/index.html");
QTest::newRow("data2") << QString::fromLatin1("file") << n << n << n << -1 << QString::fromLatin1("/root") << QByteArray()
<< n << QString::fromLatin1("file:///root") << QByteArray("file:///root");
}
@@ -1772,22 +1772,22 @@ void tst_QUrl::compat_legacy()
/* others
*/
{
- QUrl u( "http://www.trolltech.com/images/ban/pgs_front.jpg" );
+ QUrl u( "http://qt.nokia.com/images/ban/pgs_front.jpg" );
QCOMPARE( u.path(), QString("/images/ban/pgs_front.jpg") );
}
{
- QUrl tmp( "http://www.trolltech.com/images/ban/" );
+ QUrl tmp( "http://qt.nokia.com/images/ban/" );
QUrl u = tmp.resolved(QString("pgs_front.jpg"));
QCOMPARE( u.path(), QString("/images/ban/pgs_front.jpg") );
}
{
QUrl tmp;
- QUrl u = tmp.resolved(QString("http://www.trolltech.com/images/ban/pgs_front.jpg"));
+ QUrl u = tmp.resolved(QString("http://qt.nokia.com/images/ban/pgs_front.jpg"));
QCOMPARE( u.path(), QString("/images/ban/pgs_front.jpg") );
}
{
QUrl tmp;
- QUrl u = tmp.resolved(QString("http://www.trolltech.com/images/ban/pgs_front.jpg"));
+ QUrl u = tmp.resolved(QString("http://qt.nokia.com/images/ban/pgs_front.jpg"));
QFileInfo fi(u.path());
u.setPath(fi.path());
QCOMPARE( u.path(), QString("/images/ban") );
@@ -1802,8 +1802,8 @@ void tst_QUrl::compat_constructor_01_data()
//next we fill it with data
QTest::newRow( "data0" ) << QString("Makefile") << QString("Makefile"); // nolonger add file by defualt
QTest::newRow( "data1" ) << QString("Makefile") << QString("Makefile");
- QTest::newRow( "data2" ) << QString("ftp://ftp.trolltech.com/qt/INSTALL") << QString("ftp://ftp.trolltech.com/qt/INSTALL");
- QTest::newRow( "data3" ) << QString("ftp://ftp.trolltech.com/qt/INSTALL") << QString("ftp://ftp.trolltech.com/qt/INSTALL");
+ QTest::newRow( "data2" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
+ QTest::newRow( "data3" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
}
void tst_QUrl::compat_constructor_01()
@@ -1818,7 +1818,7 @@ void tst_QUrl::compat_constructor_01()
* as well as the following:
*
* QUrlOperator op;
- * op.copy(QString("ftp://ftp.trolltech.com/qt/INSTALL"), ".");
+ * op.copy(QString("ftp://ftp.qt.nokia.com/qt/INSTALL"), ".");
*/
QFETCH( QString, urlStr );
@@ -1843,15 +1843,15 @@ void tst_QUrl::compat_constructor_02_data()
QTest::addColumn<QString>("res");
//next we fill it with data
- QTest::newRow( "data0" ) << QString("ftp://ftp.trolltech.com/qt") << QString("INSTALL") << QString("ftp://ftp.trolltech.com/INSTALL");
- QTest::newRow( "data1" ) << QString("ftp://ftp.trolltech.com/qt/") << QString("INSTALL") << QString("ftp://ftp.trolltech.com/qt/INSTALL");
+ QTest::newRow( "data0" ) << QString("ftp://ftp.qt.nokia.com/qt") << QString("INSTALL") << QString("ftp://ftp.qt.nokia.com/INSTALL");
+ QTest::newRow( "data1" ) << QString("ftp://ftp.qt.nokia.com/qt/") << QString("INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
}
void tst_QUrl::compat_constructor_02()
{
/* The following should work as expected:
*
- * QUrlOperator op( "ftp://ftp.trolltech.com/qt" );
+ * QUrlOperator op( "ftp://ftp.qt.nokia.com/qt" );
* op.copy(QString("INSTALL"), ".");
*/
QFETCH( QString, urlStr );
@@ -1869,12 +1869,12 @@ void tst_QUrl::compat_constructor_03_data()
QTest::addColumn<QString>("res");
//next we fill it with data
- QTest::newRow( "protocol00" ) << QString( "http://www.trolltech.com/index.html" ) << QString( "http://www.trolltech.com/index.html" );
- QTest::newRow( "protocol01" ) << QString( "http://www.trolltech.com" ) << QString( "http://www.trolltech.com" );
- QTest::newRow( "protocol02" ) << QString( "http://www.trolltech.com/" ) << QString( "http://www.trolltech.com/" );
- QTest::newRow( "protocol03" ) << QString( "http://www.trolltech.com/foo" ) << QString( "http://www.trolltech.com/foo" );
- QTest::newRow( "protocol04" ) << QString( "http://www.trolltech.com/foo/" ) << QString( "http://www.trolltech.com/foo/" );
- QTest::newRow( "protocol05" ) << QString( "ftp://ftp.trolltech.com/foo/index.txt" ) << QString( "ftp://ftp.trolltech.com/foo/index.txt" );
+ QTest::newRow( "protocol00" ) << QString( "http://qt.nokia.com/index.html" ) << QString( "http://qt.nokia.com/index.html" );
+ QTest::newRow( "protocol01" ) << QString( "http://qt.nokia.com" ) << QString( "http://qt.nokia.com" );
+ QTest::newRow( "protocol02" ) << QString( "http://qt.nokia.com/" ) << QString( "http://qt.nokia.com/" );
+ QTest::newRow( "protocol03" ) << QString( "http://qt.nokia.com/foo" ) << QString( "http://qt.nokia.com/foo" );
+ QTest::newRow( "protocol04" ) << QString( "http://qt.nokia.com/foo/" ) << QString( "http://qt.nokia.com/foo/" );
+ QTest::newRow( "protocol05" ) << QString( "ftp://ftp.qt.nokia.com/foo/index.txt" ) << QString( "ftp://ftp.qt.nokia.com/foo/index.txt" );
QTest::newRow( "local00" ) << QString( "/foo" ) << QString( "/foo" );
QTest::newRow( "local01" ) << QString( "/foo/" ) << QString( "/foo/" );
@@ -1916,11 +1916,11 @@ void tst_QUrl::compat_isValid_01_data()
QTest::addColumn<QString>("urlStr");
QTest::addColumn<bool>("res");
- QTest::newRow( "ok_01" ) << QString("ftp://ftp.trolltech.com/qt/INSTALL") << (bool)true;
+ QTest::newRow( "ok_01" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << (bool)true;
QTest::newRow( "ok_02" ) << QString( "file:/foo") << (bool)true;
QTest::newRow( "ok_03" ) << QString( "file:foo") << (bool)true;
- QTest::newRow( "err_01" ) << QString("#ftp://ftp.trolltech.com/qt/INSTALL") << (bool)true;
+ QTest::newRow( "err_01" ) << QString("#ftp://ftp.qt.nokia.com/qt/INSTALL") << (bool)true;
QTest::newRow( "err_02" ) << QString( "file:/::foo") << (bool)true;
}
@@ -1946,18 +1946,18 @@ void tst_QUrl::compat_isValid_02_data()
QString n = "";
QTest::newRow( "ok_01" ) << n << n << n << n << -1 << QString("path") << (bool)true;
- QTest::newRow( "ok_02" ) << QString("ftp") << n << n << QString("ftp.trolltech.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_03" ) << QString("ftp") << QString("foo") << n << QString("ftp.trolltech.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_04" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.trolltech.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_05" ) << QString("ftp") << n << n << QString("ftp.trolltech.com") << -1 << QString("path")<< (bool)true;
- QTest::newRow( "ok_06" ) << QString("ftp") << QString("foo") << n << QString("ftp.trolltech.com") << -1 << QString("path") << (bool)true;
- QTest::newRow( "ok_07" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.trolltech.com") << -1 << QString("path")<< (bool)true;
+ QTest::newRow( "ok_02" ) << QString("ftp") << n << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
+ QTest::newRow( "ok_03" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
+ QTest::newRow( "ok_04" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
+ QTest::newRow( "ok_05" ) << QString("ftp") << n << n << QString("ftp.qt.nokia.com") << -1 << QString("path")<< (bool)true;
+ QTest::newRow( "ok_06" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt.nokia.com") << -1 << QString("path") << (bool)true;
+ QTest::newRow( "ok_07" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt.nokia.com") << -1 << QString("path")<< (bool)true;
QTest::newRow( "err_01" ) << n << n << n << n << -1 << n << (bool)false;
QTest::newRow( "err_02" ) << QString("ftp") << n << n << n << -1 << n << (bool)true;
QTest::newRow( "err_03" ) << n << QString("foo") << n << n << -1 << n << (bool)true;
QTest::newRow( "err_04" ) << n << n << QString("bar") << n << -1 << n << (bool)true;
- QTest::newRow( "err_05" ) << n << n << n << QString("ftp.trolltech.com") << -1 << n << (bool)true;
+ QTest::newRow( "err_05" ) << n << n << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
QTest::newRow( "err_06" ) << n << n << n << n << 80 << n << (bool)true;
QTest::newRow( "err_07" ) << QString("ftp") << QString("foo") << n << n << -1 << n << (bool)true;
QTest::newRow( "err_08" ) << QString("ftp") << n << QString("bar") << n << -1 << n << (bool)true;
@@ -1996,7 +1996,7 @@ void tst_QUrl::compat_path_data()
QTest::addColumn<QString>("url");
QTest::addColumn<QString>("res");
- QTest::newRow( "protocol00" ) << "http://www.trolltech.com/images/ban/pgs_front.jpg" << "/images/ban/pgs_front.jpg";
+ QTest::newRow( "protocol00" ) << "http://qt.nokia.com/images/ban/pgs_front.jpg" << "/images/ban/pgs_front.jpg";
#if defined( Q_OS_WIN32 )
QTest::newRow( "winShare00" ) << "//Anarki/homes" << "/homes";
@@ -2046,8 +2046,8 @@ void tst_QUrl::compat_decode_data()
QTest::newRow("NormalString") << QByteArray("filename") << QString("filename");
QTest::newRow("NormalStringEncoded") << QByteArray("file%20name") << QString("file name");
QTest::newRow("JustEncoded") << QByteArray("%20") << QString(" ");
- QTest::newRow("HTTPUrl") << QByteArray("http://www.trolltech.com") << QString("http://www.trolltech.com");
- QTest::newRow("HTTPUrlEncoded") << QByteArray("http://www%20trolltech%20com") << QString("http://www trolltech com");
+ QTest::newRow("HTTPUrl") << QByteArray("http://qt.nokia.com") << QString("http://qt.nokia.com");
+ QTest::newRow("HTTPUrlEncoded") << QByteArray("http://www%20trolltech%20com") << QString("http://qt.nokia.com");
QTest::newRow("EmptyString") << QByteArray("") << QString("");
QTest::newRow("Task27166") << QByteArray("Fran%C3%A7aise") << QString("Française");
}
@@ -2068,8 +2068,8 @@ void tst_QUrl::compat_encode_data()
QTest::newRow("NormalString") << QString("filename") << QByteArray("filename");
QTest::newRow("NormalStringEncoded") << QString("file name") << QByteArray("file%20name");
QTest::newRow("JustEncoded") << QString(" ") << QByteArray("%20");
- QTest::newRow("HTTPUrl") << QString("http://www.trolltech.com") << QByteArray("http%3A//www.trolltech.com");
- QTest::newRow("HTTPUrlEncoded") << QString("http://www trolltech com") << QByteArray("http%3A//www%20trolltech%20com");
+ QTest::newRow("HTTPUrl") << QString("http://qt.nokia.com") << QByteArray("http%3A//qt.nokia.com");
+ QTest::newRow("HTTPUrlEncoded") << QString("http://qt.nokia.com") << QByteArray("http%3A//www%20trolltech%20com");
QTest::newRow("EmptyString") << QString("") << QByteArray("");
QTest::newRow("Task27166") << QString::fromLatin1("Française") << QByteArray("Fran%C3%A7aise");
}
@@ -2173,8 +2173,8 @@ void tst_QUrl::symmetry()
QCOMPARE(url.allQueryItemValues("a").join("").toLatin1().constData(), "bdøf");
QCOMPARE(url.fragment(), QString::fromLatin1("vræl"));
- QUrl onlyHost("//www.trolltech.com");
- QCOMPARE(onlyHost.toString(), QString::fromLatin1("//www.trolltech.com"));
+ QUrl onlyHost("//qt.nokia.com");
+ QCOMPARE(onlyHost.toString(), QString::fromLatin1("//qt.nokia.com"));
{
QString urlString = QString::fromLatin1("http://desktop:33326/upnp/{32f525a6-6f31-426e-91ca-01c2e6c2c57e}");
@@ -2276,7 +2276,7 @@ void tst_QUrl::isRelative_data()
QTest::addColumn<QString>("url");
QTest::addColumn<bool>("trueFalse");
- QTest::newRow("not") << QString::fromLatin1("http://www.trolltech.com") << false;
+ QTest::newRow("not") << QString::fromLatin1("http://qt.nokia.com") << false;
QTest::newRow("55288") << QString::fromLatin1("node64.html#fig:form:ana") << true;
// kde
@@ -2437,12 +2437,12 @@ void tst_QUrl::schemeValidator_data()
// ftp
QTest::newRow("ftp:") << QByteArray("ftp:") << true << QString("ftp:");
- QTest::newRow("ftp://ftp.trolltech.com")
- << QByteArray("ftp://ftp.trolltech.com")
- << true << QString("ftp://ftp.trolltech.com");
- QTest::newRow("ftp://ftp.trolltech.com/")
- << QByteArray("ftp://ftp.trolltech.com/")
- << true << QString("ftp://ftp.trolltech.com/");
+ QTest::newRow("ftp://ftp.qt.nokia.com")
+ << QByteArray("ftp://ftp.qt.nokia.com")
+ << true << QString("ftp://ftp.qt.nokia.com");
+ QTest::newRow("ftp://ftp.qt.nokia.com/")
+ << QByteArray("ftp://ftp.qt.nokia.com/")
+ << true << QString("ftp://ftp.qt.nokia.com/");
QTest::newRow("ftp:/index.html")
<< QByteArray("ftp:/index.html")
<< false << QString();
@@ -2476,32 +2476,32 @@ void tst_QUrl::invalidSchemeValidator()
// test that if scheme does not start with an ALPHA, QUrl::isValid() returns false
{
- QUrl url("1http://www.trolltech.com", QUrl::StrictMode);
+ QUrl url("1http://qt.nokia.com", QUrl::StrictMode);
qDebug() << url;
QCOMPARE(url.isValid(), false);
}
{
- QUrl url("http://www.trolltech.com");
- url.setScheme("111http://www.trolltech.com");
+ QUrl url("http://qt.nokia.com");
+ url.setScheme("111http://qt.nokia.com");
QCOMPARE(url.isValid(), false);
}
{
- QUrl url = QUrl::fromEncoded("1http://www.trolltech.com", QUrl::StrictMode);
+ QUrl url = QUrl::fromEncoded("1http://qt.nokia.com", QUrl::StrictMode);
QCOMPARE(url.isValid(), false);
}
// non-ALPHA character at other positions in the scheme are ok
{
- QUrl url("ht111tp://www.trolltech.com", QUrl::StrictMode);
+ QUrl url("ht111tp://qt.nokia.com", QUrl::StrictMode);
QVERIFY(url.isValid());
}
{
- QUrl url("http://www.trolltech.com");
- url.setScheme("ht123tp://www.trolltech.com");
+ QUrl url("http://qt.nokia.com");
+ url.setScheme("ht123tp://qt.nokia.com");
QVERIFY(url.isValid());
}
{
- QUrl url = QUrl::fromEncoded("ht321tp://www.trolltech.com", QUrl::StrictMode);
+ QUrl url = QUrl::fromEncoded("ht321tp://qt.nokia.com", QUrl::StrictMode);
QVERIFY(url.isValid());
}
}
@@ -3493,7 +3493,7 @@ void tst_QUrl::hosts_data()
// normal hostnames
QTest::newRow("normal") << QString("http://intern") << QString("intern");
- QTest::newRow("normal2") << QString("http://www.trolltech.com") << QString("www.trolltech.com");
+ QTest::newRow("normal2") << QString("http://qt.nokia.com") << QString("qt.nokia.com");
// IDN hostnames
QTest::newRow("idn") << QString(QLatin1String("http://\345r.no")) << QString(QLatin1String("\345r.no"));