diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-07-26 09:37:11 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-08-17 20:26:43 +0200 |
commit | 37430020d373304f812fa822651cf2a0ccf636d3 (patch) | |
tree | a4c6b84fbb12a9c56d0ee9b91ce5192eb7514e56 /tests/auto | |
parent | b18818d918ed9f2d9775d1786ef641dfa30aadf6 (diff) |
Add clearHttpCacheCompleted signal to profile
[ChangeLog][QtWebEngineQuick][WebEngineProfile] Added
clearHttpCacheCompleted signal.
[ChangeLog][QtWebEngineCore][QWebEngineProfile] Added
clearHttpCacheCompleted signal.
Fixes: QTBUG-89670
Fixes: QTBUG-111541
Change-Id: If93a99f7171c516ef75a3c8004da9ae621705a1a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/publicapi/tst_publicapi.cpp | 1 | ||||
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp index bcb503a4d..34d51c558 100644 --- a/tests/auto/quick/publicapi/tst_publicapi.cpp +++ b/tests/auto/quick/publicapi/tst_publicapi.cpp @@ -351,6 +351,7 @@ static const QStringList expectedAPI = QStringList() << "QQuickWebEngineProfile.cachePath --> QString" << "QQuickWebEngineProfile.cachePathChanged() --> void" << "QQuickWebEngineProfile.clearHttpCache() --> void" + << "QQuickWebEngineProfile.clearHttpCacheCompleted() --> void" << "QQuickWebEngineProfile.downloadFinished(QQuickWebEngineDownloadRequest*) --> void" << "QQuickWebEngineProfile.downloadRequested(QQuickWebEngineDownloadRequest*) --> void" << "QQuickWebEngineProfile.downloadPath --> QString" diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index 471385223..095d4c8f2 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -190,6 +190,7 @@ void tst_QWebEngineProfile::clearDataFromCache() AutoDir cacheDir("./tst_QWebEngineProfile_clearDataFromCache"); QWebEngineProfile profile(QStringLiteral("clearDataFromCache")); + QSignalSpy cacheSpy(&profile, &QWebEngineProfile::clearHttpCacheCompleted); profile.setCachePath(cacheDir.path()); profile.setHttpCacheType(QWebEngineProfile::DiskHttpCache); @@ -201,8 +202,7 @@ void tst_QWebEngineProfile::clearDataFromCache() QVERIFY(cacheDir.exists("Cache")); qint64 sizeBeforeClear = totalSize(cacheDir); profile.clearHttpCache(); - // Wait for cache to be cleared. - QTest::qWait(1000); + QTRY_COMPARE(cacheSpy.size(), 1); QVERIFY(sizeBeforeClear > totalSize(cacheDir)); (void)server.stop(); |