diff --git a/autotests/favicontest.cpp b/autotests/favicontest.cpp --- a/autotests/favicontest.cpp +++ b/autotests/favicontest.cpp @@ -36,6 +36,7 @@ static const char s_iconUrl[] = "http://www.google.com/favicon.ico"; static const char s_altIconUrl[] = "http://www.ibm.com/favicon.ico"; static const char s_thirdIconUrl[] = "http://www.google.fr/favicon.ico"; +static const char s_failingIconUrl[] = "https://www.kde.org/kio_test_non_existing_favicon.ico"; static const char s_iconUrlForThreadTest[] = "http://www.google.de/favicon.ico"; static enum NetworkAccess { Unknown, Yes, No } s_networkAccess = Unknown; @@ -210,20 +211,20 @@ // Set icon URL to a non-existing favicon KIO::FavIconRequestJob *job = new KIO::FavIconRequestJob(url); - job->setIconUrl(QUrl("http://www.kde.org/favicon.ico")); + job->setIconUrl(QUrl(s_failingIconUrl)); QVERIFY(willDownload(job)); QVERIFY(!job->exec()); QVERIFY(job->iconFile().isEmpty()); QCOMPARE(job->error(), int(KIO::ERR_DOES_NOT_EXIST)); - QCOMPARE(job->errorString(), QStringLiteral("The file or folder http://www.kde.org/favicon.ico does not exist.")); + QCOMPARE(job->errorString(), QString("The file or folder %1 does not exist.").arg(s_failingIconUrl)); // Second job should use the cache and not do anything KIO::FavIconRequestJob *secondJob = new KIO::FavIconRequestJob(url); QVERIFY(!willDownload(secondJob)); QVERIFY(!secondJob->exec()); QVERIFY(secondJob->iconFile().isEmpty()); QCOMPARE(job->error(), int(KIO::ERR_DOES_NOT_EXIST)); - QCOMPARE(job->errorString(), QStringLiteral("The file or folder http://www.kde.org/favicon.ico does not exist.")); + QCOMPARE(job->errorString(), QString("The file or folder %1 does not exist.").arg(s_failingIconUrl)); } void FavIconTest::tooBigFaviconShouldAbort()