diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2024-05-03 11:23:20 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2024-05-07 10:34:51 +0200 |
commit | 9fb9bc7a8c769fe1c60c1d891abf33c234899b77 (patch) | |
tree | d274898232a980b7b96c8eaf547ebb7d1bb67126 /tests | |
parent | 9e4074c74184130fd9328d6a6e7a7d8049cf27e1 (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')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 4 |
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(); } |