diff options
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index 6b32bb826..6350c8510 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -237,6 +237,7 @@ static bool loadSync(QWebEngineView *view, const QUrl &url, bool ok = true) void tst_QWebEngineProfile::clearDataFromCache() { TestServer server; + QSignalSpy serverSpy(&server, &HttpServer::newRequest); QVERIFY(server.start()); AutoDir cacheDir("./tst_QWebEngineProfile_clearDataFromCache"); @@ -247,6 +248,8 @@ void tst_QWebEngineProfile::clearDataFromCache() QWebEnginePage page(&profile); QVERIFY(loadSync(&page, server.url("/hedgehog.html"))); + // Wait for GET /favicon.ico + QTRY_COMPARE(serverSpy.size(), 3); QVERIFY(cacheDir.exists("Cache")); qint64 sizeBeforeClear = totalSize(cacheDir); |