summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2021-06-16 14:44:05 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2021-06-18 23:57:16 +0000
commit0ddaf1cebd2ae1df3733bc056296428287aaefd7 (patch)
treec1a80f082661472276daa6ad8be924d9a58e947e /tests/auto/widgets
parent2ad450018e8ae22f4c426a421fa5c0995feb1e16 (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. Pick-to: 6.2 Change-Id: Id3ccfe0dd1a9dc151e6f392e666c2aac084b014a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-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 fb0425893..60073251c 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -229,7 +229,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);
@@ -846,11 +846,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:
@@ -877,7 +877,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")));
@@ -904,7 +904,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")));
@@ -927,7 +927,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")));
@@ -946,7 +946,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());