summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2021-06-16 14:44:05 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-28 11:52:05 +0000
commit456f5ac29768edb95b3bc1a7cf91334e1d3c908a (patch)
treea97035a65a4807604f916626e110294ac789bf07 /tests
parentd411328f2a7ff9993bcce5b1db74280a39c90981 (diff)
Make sure tst_QWebEngineProfile tests use their own custom profile
Shared custom profiles may lead to assert on destruction. For example, when an HistoryBackend closes the connection with the database and another profile with same path tries to create it at the same time. Change-Id: Id3ccfe0dd1a9dc151e6f392e666c2aac084b014a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 0ddaf1cebd2ae1df3733bc056296428287aaefd7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index c75715ae8..a998d7998 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -221,7 +221,7 @@ void tst_QWebEngineProfile::clearDataFromCache()
AutoDir cacheDir("./tst_QWebEngineProfile_clearDataFromCache");
- QWebEngineProfile profile(QStringLiteral("Test"));
+ QWebEngineProfile profile(QStringLiteral("clearDataFromCache"));
profile.setCachePath(cacheDir.path());
profile.setHttpCacheType(QWebEngineProfile::DiskHttpCache);
@@ -838,11 +838,11 @@ void tst_QWebEngineProfile::changePersistentPath()
QVERIFY(server.start());
AutoDir dataDir1(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
- + QStringLiteral("/QtWebEngine/Test"));
+ + QStringLiteral("/QtWebEngine/changePersistentPath1"));
AutoDir dataDir2(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
- + QStringLiteral("/QtWebEngine/Test2"));
+ + QStringLiteral("/QtWebEngine/changePersistentPath2"));
- QWebEngineProfile testProfile(QStringLiteral("Test"));
+ QWebEngineProfile testProfile(QStringLiteral("changePersistentPath1"));
QCOMPARE(testProfile.persistentStoragePath(), dataDir1.path());
// Make sure the profile has been used:
@@ -869,7 +869,7 @@ void tst_QWebEngineProfile::changeHttpUserAgent()
userAgents.push_back(rr->requestHeader(QByteArrayLiteral("user-agent")));
});
- QWebEngineProfile profile(QStringLiteral("Test"));
+ QWebEngineProfile profile(QStringLiteral("changeHttpUserAgent"));
std::unique_ptr<QWebEnginePage> page;
page.reset(new QWebEnginePage(&profile));
QVERIFY(loadSync(page.get(), server.url("/hedgehog.html")));
@@ -896,7 +896,7 @@ void tst_QWebEngineProfile::changeHttpAcceptLanguage()
languages.push_back(rr->requestHeader(QByteArrayLiteral("accept-language")));
});
- QWebEngineProfile profile(QStringLiteral("Test"));
+ QWebEngineProfile profile(QStringLiteral("changeHttpAcceptLanguage"));
std::unique_ptr<QWebEnginePage> page;
page.reset(new QWebEnginePage(&profile));
QVERIFY(loadSync(page.get(), server.url("/hedgehog.html")));
@@ -919,7 +919,7 @@ void tst_QWebEngineProfile::changeUseForGlobalCertificateVerification()
// Check that we don't crash
- QWebEngineProfile profile(QStringLiteral("Test"));
+ QWebEngineProfile profile(QStringLiteral("changeUseForGlobalCertifateVerification"));
std::unique_ptr<QWebEnginePage> page;
page.reset(new QWebEnginePage(&profile));
QVERIFY(loadSync(page.get(), server.url("/hedgehog.html")));
@@ -938,7 +938,7 @@ void tst_QWebEngineProfile::changePersistentCookiesPolicy()
AutoDir dataDir("./tst_QWebEngineProfile_dataDir");
- QWebEngineProfile profile(QStringLiteral("Test"));
+ QWebEngineProfile profile(QStringLiteral("changePersistentCookiesPolicy"));
QWebEnginePage page(&profile);
profile.setPersistentStoragePath(dataDir.path());