diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2021-05-20 17:16:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-10 21:03:35 +0000 |
commit | 92b5d1cfe46f25189235953bde0266d79098fc06 (patch) | |
tree | 3291022d0602458dac39d004b4770bd569d8e923 /tests/auto/quick/qmltests/data/tst_navigationRequested.qml | |
parent | 513c5435536c041eb89136fbc322a68e38caf845 (diff) |
Ensure certificate error callback call for all types
Amends a2a9ea11f9. Actually reject certificate when it's considered to
be fatal. Adapt tests for possible regression but checking if load
really failed (due to missing internet access) or was just halted by
missing callback call internaly.
Change-Id: I656525c353ce410f7bda8c55227a29fcd617bfdd
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 3acfd3b1cd39e89fb6bc2f0da3412f07d68de7b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick/qmltests/data/tst_navigationRequested.qml')
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_navigationRequested.qml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml index 462dc8297..11ea69e11 100644 --- a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml +++ b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml @@ -94,19 +94,17 @@ TestWebEngineView { // Test if we get notified about main frame and iframe loads compare(navigationSpy.count, 0) webEngineView.url = Qt.resolvedUrl("test-iframe.html") - navigationSpy.wait() + verify(webEngineView.waitForLoadSucceeded()) compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html")) - navigationSpy.wait() compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html")) compare(navigationSpy.count, 2) - verify(webEngineView.waitForLoadSucceeded()) // Test if we get notified about clicked links mouseClick(webEngineView, 100, 100) - tryCompare(navigationSpy, "count", 3) + verify(webEngineView.waitForLoadSucceeded()) compare(attributes.mainUrl, Qt.resolvedUrl("test1.html")) verify(attributes.linkClickedNavigationRequested) - verify(webEngineView.waitForLoadSucceeded()) + compare(navigationSpy.count, 3) } function test_ignoreLinkClickedRequest() { @@ -117,26 +115,28 @@ TestWebEngineView { shouldIgnoreLinkClicks = true mouseClick(webEngineView, 100, 100) - tryCompare(navigationSpy, "count", 3) - compare(attributes.mainUrl, Qt.resolvedUrl("test1.html")) - verify(attributes.linkClickedNavigationRequested) - verify(attributes.linkClickedNavigationIgnored) // We ignored the main frame request, so we should // get notified that the load has been stopped. verify(webEngineView.waitForLoadStopped()) verify(!webEngineView.loading) + + compare(navigationSpy.count, 3) + compare(attributes.mainUrl, Qt.resolvedUrl("test1.html")) + verify(attributes.linkClickedNavigationRequested) + verify(attributes.linkClickedNavigationIgnored) } function test_ignoreSubFrameRequest() { // Test if we can ignore sub frame requests shouldIgnoreSubFrameRequests = true webEngineView.url = Qt.resolvedUrl("test-iframe.html") - tryCompare(navigationSpy, "count", 2) - compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html")) - compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html")) // We ignored the sub frame request, so // the main frame load should still succeed. verify(webEngineView.waitForLoadSucceeded()) + + compare(navigationSpy.count, 2) + compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html")) + compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html")) } } } |