summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index f4c0484eb..93a7c6acd 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -35,11 +35,11 @@
#include <QtWebEngineCore/qwebenginecookiestore.h>
#include <QtWebEngineCore/qwebengineurlscheme.h>
#include <QtWebEngineCore/qwebengineurlschemehandler.h>
-#include <QtWebEngineWidgets/qwebengineprofile.h>
-#include <QtWebEngineWidgets/qwebenginepage.h>
-#include <QtWebEngineWidgets/qwebenginesettings.h>
+#include <QtWebEngineCore/qwebenginesettings.h>
+#include <QtWebEngineCore/qwebengineprofile.h>
+#include <QtWebEngineCore/qwebenginepage.h>
+#include <QtWebEngineCore/qwebenginedownloadrequest.h>
#include <QtWebEngineWidgets/qwebengineview.h>
-#include <QtWebEngineWidgets/qwebenginedownloaditem.h>
#if QT_CONFIG(webengine_webchannel)
#include <QWebChannel>
@@ -116,7 +116,7 @@ void tst_QWebEngineProfile::init()
QCOMPARE(profile->persistentCookiesPolicy(), QWebEngineProfile::AllowPersistentCookies);
QCOMPARE(profile->cachePath(), QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/QtWebEngine/Default"));
- QCOMPARE(profile->persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(profile->persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Default"));
}
@@ -136,7 +136,7 @@ void tst_QWebEngineProfile::privateProfile()
QCOMPARE(otrProfile.httpCacheType(), QWebEngineProfile::MemoryHttpCache);
QCOMPARE(otrProfile.persistentCookiesPolicy(), QWebEngineProfile::NoPersistentCookies);
QCOMPARE(otrProfile.cachePath(), QString());
- QCOMPARE(otrProfile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(otrProfile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/OffTheRecord"));
// TBD: setters do not really work
otrProfile.setCachePath(QStringLiteral("/home/foo/bar"));
@@ -159,7 +159,7 @@ void tst_QWebEngineProfile::testProfile()
QCOMPARE(profile.persistentCookiesPolicy(), QWebEngineProfile::AllowPersistentCookies);
QCOMPARE(profile.cachePath(), QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/QtWebEngine/Test"));
- QCOMPARE(profile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(profile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test"));
}
@@ -832,10 +832,10 @@ void tst_QWebEngineProfile::httpAcceptLanguage()
void tst_QWebEngineProfile::downloadItem()
{
- qRegisterMetaType<QWebEngineDownloadItem *>();
+ qRegisterMetaType<QWebEngineDownloadRequest *>();
QWebEngineProfile testProfile;
QWebEnginePage page(&testProfile);
- QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadItem *)));
+ QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadRequest *)));
page.load(QUrl::fromLocalFile(QCoreApplication::applicationFilePath()));
QTRY_COMPARE(downloadSpy.count(), 1);
}
@@ -845,9 +845,9 @@ void tst_QWebEngineProfile::changePersistentPath()
TestServer server;
QVERIFY(server.start());
- AutoDir dataDir1(QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ AutoDir dataDir1(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test"));
- AutoDir dataDir2(QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ AutoDir dataDir2(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test2"));
QWebEngineProfile testProfile(QStringLiteral("Test"));
@@ -871,7 +871,7 @@ void tst_QWebEngineProfile::changeHttpUserAgent()
TestServer server;
QVERIFY(server.start());
- QVector<QByteArray> userAgents;
+ QList<QByteArray> userAgents;
connect(&server, &HttpServer::newRequest, [&](HttpReqRep *rr) {
if (rr->requestPath() == "/hedgehog.html")
userAgents.push_back(rr->requestHeader(QByteArrayLiteral("user-agent")));
@@ -898,7 +898,7 @@ void tst_QWebEngineProfile::changeHttpAcceptLanguage()
TestServer server;
QVERIFY(server.start());
- QVector<QByteArray> languages;
+ QList<QByteArray> languages;
connect(&server, &HttpServer::newRequest, [&](HttpReqRep *rr) {
if (rr->requestPath() == "/hedgehog.html")
languages.push_back(rr->requestHeader(QByteArrayLiteral("accept-language")));