Skip to content

Commit 1141321

Browse files
committed
Initialize progress right away with QtWebKit 5.212 (ariya#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.
1 parent 4e8248d commit 1141321

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: src/webpage.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,9 @@ void WebPage::openUrl(const QString& address, const QVariant& op, const QVariant
951951

952952
request.setUrl(url);
953953
m_mainFrame->load(request, networkOp, body);
954+
955+
// Emulate the behavior of old QtWebKit
956+
m_loadingProgress = 1;
954957
}
955958
}
956959

Diff for: test/module/webpage/loading.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@ async_test(function () {
1818

1919
assert_is_true(page.loading);
2020
assert_greater_than(page.loadingProgress, 0);
21-
}, "page loading progress",
22-
{ skip: true } // FIXME
23-
);
21+
}, "page loading progress");

0 commit comments

Comments
 (0)