diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-07-16 12:39:12 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-07-16 14:39:31 +0200 |
commit | a4cf124c839c271b3132d91fc5b580e09a1ae95f (patch) | |
tree | 09f9617bf04990da2f9976890ab12d68ca2a0b9b | |
parent | ebb52fdf01a26b38d93010dfa20758fa7ec1da4c (diff) |
Improve acceptNavigationRequestNavigationType feedback
Tell us how the types changed before erroring out.
Pick-to: 6.2
Change-Id: Ib606bc3def58959a91f6d4ee97c797fced389131
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 4 |
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 b69df1ced..7ac2b043a 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. |