From 114132117002f7c9c3b9460517d3649b9423ce78 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 9 Jan 2020 16:29:35 -0800 Subject: [PATCH] Initialize progress right away with QtWebKit 5.212 (#15342) Apparently loading progress used to move beyond 0 right after the frame start loading an URI, even before there is network traffic. This behavior compatibility prevents the regression on the test module/webpage/loading.js. --- src/webpage.cpp | 3 +++ test/module/webpage/loading.js | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index 31420a25c6..b0fa9cbe98 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -951,6 +951,9 @@ void WebPage::openUrl(const QString& address, const QVariant& op, const QVariant request.setUrl(url); m_mainFrame->load(request, networkOp, body); + + // Emulate the behavior of old QtWebKit + m_loadingProgress = 1; } } diff --git a/test/module/webpage/loading.js b/test/module/webpage/loading.js index 61aade1dee..6af3324429 100644 --- a/test/module/webpage/loading.js +++ b/test/module/webpage/loading.js @@ -18,6 +18,4 @@ async_test(function () { assert_is_true(page.loading); assert_greater_than(page.loadingProgress, 0); -}, "page loading progress", - { skip: true } // FIXME -); +}, "page loading progress");