diff options
author | Tamas Zakor <ztamas@inf.u-szeged.hu> | 2020-11-09 16:28:04 +0100 |
---|---|---|
committer | Tamas Zakor <ztamas@inf.u-szeged.hu> | 2020-12-03 14:16:50 +0100 |
commit | b719da05c6429d72f4e0e0af44da0bf3f3e57984 (patch) | |
tree | 60b715db5557dfa60bd13c085e8284cab875005e /tests/auto/widgets/qwebenginehistory | |
parent | 7adea5999b3eb1ac77adeb0580cb98ce35eb6ffd (diff) |
Stabilize load signals emitting
Make the WebContentsDelegateQt::EmitLoadStarted() and the
WebContentsDelegateQt::EmitLoadFinished() independent from
the WebContentsDelegateQt::LoadProgressChanged() by removing
m_lastLoadProgress.
Adapt the WebContentsDelegateQt::LoadProgressChanged() to send
signal only if load is in progress.
Add a new test based on the bugreport.
Fix qmltests::WebEngineViewSource::test_viewSourceURL() flaky tests.
Fixes: QTBUG-65223
Fixes: QTBUG-87089
Change-Id: I90af4d2e85105dba801beb8102991eb4ef14c6a3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebenginehistory')
-rw-r--r-- | tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp index bdb486793..72a45379b 100644 --- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp +++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp @@ -320,7 +320,8 @@ void tst_QWebEngineHistory::serialize_2() hist->forward(); QTRY_COMPARE(loadFinishedSpy->count(), 5); hist->forward(); - QTRY_COMPARE(loadFinishedSpy->count(), 6); + // In-page navigation, the last url was the page5.html + QTRY_COMPARE(loadFinishedSpy->count(), 5); QTRY_COMPARE(hist->currentItemIndex(), initialCurrentIndex); } |