diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-05-22 01:26:10 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-05-22 14:11:20 +0200 |
commit | 5f12127c9087a022d32ae91499f82157b0b49eff (patch) | |
tree | ecf1c59cffe47e49597250b54c8f7b10e643ec16 /tests/auto/core | |
parent | eccd79358b682f920d62f3cb82ae0eb58382f381 (diff) |
Fix qwebenginecookiestore test on windows
Wait for each test.html resources: Img.ico and Fav.png to
be requested before triggering new action.
Change-Id: I02839a24a9b0ed5feee61bc8af9aa3bfbf6af496
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto/core')
-rw-r--r-- | tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp index e056fef8f..0e8248508 100644 --- a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp +++ b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp @@ -287,6 +287,8 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP() QTRY_COMPARE(accessTested.loadAcquire(), 4); QVERIFY(cookieRequestHeader.isEmpty()); + QTRY_COMPARE(serverSpy.count(), 3); + page.triggerAction(QWebEnginePage::Reload); QTRY_COMPARE(loadSpy.count(), 1); QVERIFY(loadSpy.takeFirst().takeFirst().toBool()); @@ -294,6 +296,8 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP() QTRY_COMPARE(cookieAddedSpy.count(), 1); QTRY_COMPARE(accessTested.loadAcquire(), 7); + QTRY_COMPARE(serverSpy.count(), 6); + client->deleteAllCookies(); QTRY_COMPARE(cookieRemovedSpy.count(), 1); @@ -310,6 +314,9 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP() QTest::qWait(100); QCOMPARE(cookieAddedSpy.count(), 1); QTRY_COMPARE(accessTested.loadAcquire(), 11); + + QTRY_COMPARE(serverSpy.count(), 9); + page.triggerAction(QWebEnginePage::Reload); QTRY_COMPARE(loadSpy.count(), 1); QVERIFY(loadSpy.takeFirst().takeFirst().toBool()); |