summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-26 10:51:13 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-03-07 17:08:56 +0000
commit6ac33ac828b3a17cf7db7a80b3c043d51ba646a1 (patch)
tree8f3f1eb191c68d72443fef16a492d68103334051
parentb2662a46eca264cba6ba1c7ca6fb8c341e481bb5 (diff)
Fix loadProgress 100
After upgrading to Chromium 49 we no longer get the last progress signal with 100% completed. Task-number: QTBUG-51173 Change-Id: I304e8833a0e707199cfa56a078b0c4d79c1b5c30 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r--src/core/web_contents_delegate_qt.cpp1
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index f2f8199c..a369f955 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -241,6 +241,7 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame
if (render_frame_host->GetParent())
return;
+ m_viewClient->loadProgressChanged(100);
m_viewClient->loadFinished(true, toQt(validated_url));
content::NavigationEntry *entry = web_contents()->GetController().GetVisibleEntry();
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 685cb9ff..cb0e2a5f 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -3392,9 +3392,9 @@ void tst_QWebEnginePage::loadSignalsOrder()
QFETCH(QUrl, url);
QWebEnginePage page;
SpyForLoadSignalsOrder loadSpy(&page);
- waitForSignal(&loadSpy, SIGNAL(started()));
+ waitForSignal(&loadSpy, SIGNAL(started()), 500);
page.load(url);
- QTRY_VERIFY(loadSpy.isFinished());
+ QTRY_VERIFY_WITH_TIMEOUT(loadSpy.isFinished(), 500);
}
void tst_QWebEnginePage::undoActionHaveCustomText()