summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-07-16 12:39:12 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-16 18:00:54 +0000
commitf8151d8b184f14d410485a1556cbad01f9f90f65 (patch)
tree6937d682196d43ed98e7b5d67bed8a0360091421 /tests
parenta3ddeb9016996692870d0e489793c2f3460e0d22 (diff)
Improve acceptNavigationRequestNavigationType feedback
Tell us how the types changed before erroring out. Change-Id: Ib606bc3def58959a91f6d4ee97c797fced389131 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit a4cf124c839c271b3132d91fc5b580e09a1ae95f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index db467562a..7e848dbe4 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -635,17 +635,17 @@ void tst_QWebEnginePage::acceptNavigationRequestNavigationType()
QVERIFY(server.start());
page.load(QUrl(server.url("/redirect1.html")));
QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 8, 20000);
- QTRY_COMPARE(page.navigations.count(), 11);
expectedList += {
QWebEngineNavigationRequest::TypedNavigation,
QWebEngineNavigationRequest::RedirectNavigation,
QWebEngineNavigationRequest::RedirectNavigation
};
- QVERIFY(expectedList.count() == page.navigations.count());
for (int i = 0; i < expectedList.count(); ++i) {
+ QTRY_VERIFY(i < page.navigations.count());
QCOMPARE(page.navigations[i].type, expectedList[i]);
}
+ QVERIFY(expectedList.count() == page.navigations.count());
}
// Relative url without base url.