From 445235bc012fcdc73acc881f865a21769c46a6d3 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 18 Dec 2019 20:31:13 +0100 Subject: Rework url changed logic Due security changes to prevent url spoofing, our implementation is getting extra invalidate url requests. Unfortunately, this breaks our url handling, which now gets lots of new back and fort url changed signals and make several unit test failures. After tedious investigation of Chromium omnibox handing and trying out different approaches, it seems that only sensible solution is to follow Chromium logic and make NavigationStateChanged to update 'ui' in asynchronous matter. This change tries not break any tests and simplify url handling. The only side effect of this change is that WebEnginePage::setContent will get extra 'url' signal of initial 'urlData' and later 'baseUrl' change is emitted. Fix one of qml tests which did not expect to have url on LoadStartedStatus. Task-number: QTBUG-63388 Task-number: QTBUG-48995 Change-Id: Id347f4325c036e16bfae7bf2f694905e0f21f8d7 Reviewed-by: Allan Sandfeld Jensen --- tests/auto/quick/qmltests/data/tst_loadUrl.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/quick/qmltests/data/tst_loadUrl.qml') diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml index ec5c965ea..7bdd0c761 100644 --- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml +++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml @@ -230,7 +230,7 @@ TestWebEngineView { compare(loadRequest.activeUrl, aboutBlank); loadRequest = loadRequestArray[2]; compare(loadRequest.status, WebEngineView.LoadStartedStatus); - compare(loadRequest.activeUrl, aboutBlank); + compare(loadRequest.activeUrl, "data:text/html;charset=UTF-8,load failed"); compare(loadRequest.url, "data:text/html;charset=UTF-8,load failed") loadRequest = loadRequestArray[3]; compare(loadRequest.status, WebEngineView.LoadSucceededStatus); -- cgit v1.2.3