summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-23 13:11:58 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-29 09:17:28 +0200
commitf341988f451c6ba1fc3b8da765c00d1d64eaff30 (patch)
tree407e1f7d121c19d20006ec7e143210a0aea7ef92 /tests
parent1a26c0ace958c3604c8a751134429dd38168a1a1 (diff)
Return valid path in Profile::GetPath() for incognito profiles
Parts of Chromium depends on it for temporary directories it creates. This also changes the logic of depending on it being empty as indicating an in memory profile, so it required a bit of cleaning up. Note this does subtly change the return value of off-the-record profiles. Task-number: QTBUG-62957 Change-Id: Iec6e24556128c515fce27803171a766b8a9d92e3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 00d4bae5a..836f1885e 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -136,12 +136,13 @@ void tst_QWebEngineProfile::privateProfile()
QCOMPARE(otrProfile.httpCacheType(), QWebEngineProfile::MemoryHttpCache);
QCOMPARE(otrProfile.persistentCookiesPolicy(), QWebEngineProfile::NoPersistentCookies);
QCOMPARE(otrProfile.cachePath(), QString());
- QCOMPARE(otrProfile.persistentStoragePath(), QString());
+ QCOMPARE(otrProfile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ + QStringLiteral("/QtWebEngine/OffTheRecord"));
// TBD: setters do not really work
otrProfile.setCachePath(QStringLiteral("/home/foo/bar"));
QCOMPARE(otrProfile.cachePath(), QString());
otrProfile.setPersistentStoragePath(QStringLiteral("/home/foo/bar"));
- QCOMPARE(otrProfile.persistentStoragePath(), QString());
+ QCOMPARE(otrProfile.persistentStoragePath(), QStringLiteral("/home/foo/bar"));
otrProfile.setHttpCacheType(QWebEngineProfile::DiskHttpCache);
QCOMPARE(otrProfile.httpCacheType(), QWebEngineProfile::MemoryHttpCache);
otrProfile.setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);