summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineprofile
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2024-05-03 11:23:20 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2024-05-07 10:34:51 +0200
commit9fb9bc7a8c769fe1c60c1d891abf33c234899b77 (patch)
treed274898232a980b7b96c8eaf547ebb7d1bb67126 /tests/auto/widgets/qwebengineprofile
parent9e4074c74184130fd9328d6a6e7a7d8049cf27e1 (diff)
Instrument clearDataFromCache
Should help narrow down flakiness Task-number: QTBUG-122469 Change-Id: If8b0d7441af10c8aad876098c6744777696b3358 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 095d4c8f2..5bd33332b 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -188,6 +188,7 @@ void tst_QWebEngineProfile::clearDataFromCache()
QVERIFY(server.start());
AutoDir cacheDir("./tst_QWebEngineProfile_clearDataFromCache");
+ QVERIFY(!cacheDir.exists("Cache"));
QWebEngineProfile profile(QStringLiteral("clearDataFromCache"));
QSignalSpy cacheSpy(&profile, &QWebEngineProfile::clearHttpCacheCompleted);
@@ -201,9 +202,10 @@ void tst_QWebEngineProfile::clearDataFromCache()
QVERIFY(cacheDir.exists("Cache"));
qint64 sizeBeforeClear = totalSize(cacheDir);
+ QCOMPARE_GT(sizeBeforeClear, 0);
profile.clearHttpCache();
QTRY_COMPARE(cacheSpy.size(), 1);
- QVERIFY(sizeBeforeClear > totalSize(cacheDir));
+ QCOMPARE_GT(sizeBeforeClear, totalSize(cacheDir));
(void)server.stop();
}