From fafc387a32ac4b06709c0845c7f4cfd5164c1206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 3 Jul 2019 08:56:39 +0200 Subject: Bump timeout in tst_InspectorServer::openRemoteDebuggingSession Flaky on Windows 10. Change-Id: Idaf73ccaf29831010e84397ae722dbe54a2de9bb Reviewed-by: Allan Sandfeld Jensen --- tests/auto/quick/inspectorserver/tst_inspectorserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp index 8e23e86e8..922c7769e 100644 --- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp +++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp @@ -167,7 +167,7 @@ void tst_InspectorServer::openRemoteDebuggingSession() // - The page list didn't return a valid inspector URL // - Or the front-end couldn't be loaded through the inspector HTTP server // - Or the web socket connection couldn't be established between the front-end and the page through the inspector server - QTRY_VERIFY(inspectorWebView->title().startsWith("DevTools -")); + QTRY_VERIFY_WITH_TIMEOUT(inspectorWebView->title().startsWith("DevTools -"), 20000); } QTEST_MAIN(tst_InspectorServer) -- cgit v1.2.3 From 9bf361eddea701a65ea2a26f3d598ec4d4a6e22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 8 Jul 2019 10:01:16 +0200 Subject: Un-blacklist some passing tests Remove from the blacklist some tests which, according to Grafana, have had no failures in the last 90 days on 5.12 branch. Change-Id: I3f174c82b5644d74b70fffa3856ae79f8c9893f8 Reviewed-by: Allan Sandfeld Jensen --- tests/auto/quick/qmltests/BLACKLIST | 9 --------- tests/auto/quick/qquickwebengineview/BLACKLIST | 11 ----------- 2 files changed, 20 deletions(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST index dfafbaea4..083c15984 100644 --- a/tests/auto/quick/qmltests/BLACKLIST +++ b/tests/auto/quick/qmltests/BLACKLIST @@ -1,9 +1,3 @@ -[WebViewGeopermission::test_deniedGeolocationByUser] -osx - -[WebViewGeopermission::test_geoPermissionRequest] -osx - [WebEngineViewSingleFileUpload::test_acceptDirectory] * @@ -13,8 +7,5 @@ osx [WebEngineViewSingleFileUpload::test_acceptSingleFileSelection] * -[WebViewFindText::test_findTextInterruptedByLoad] -* - [WebEngineViewSource::test_viewSourceURL] * diff --git a/tests/auto/quick/qquickwebengineview/BLACKLIST b/tests/auto/quick/qquickwebengineview/BLACKLIST index 76cb18c1e..5f46fa47e 100644 --- a/tests/auto/quick/qquickwebengineview/BLACKLIST +++ b/tests/auto/quick/qquickwebengineview/BLACKLIST @@ -1,14 +1,3 @@ -[transparentWebEngineViews] -windows - -[inputEventForwardingDisabledWhenActiveFocusOnPressDisabled] -* - -[transparentWebEngineViews] -* - -[basicRenderingSanity] -* [javascriptClipboard:default] opensuse-leap [javascriptClipboard:canPaste] -- cgit v1.2.3 From fef43d7b6fad44f9ee3de12ea49cc418245b1844 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 12 Jul 2019 11:14:07 +0200 Subject: Fix quick dialog test wrong message on view's LoadStatus changed Change-Id: Ic8eb671409794799bcdad4760dc58e84de3b109f Reviewed-by: Michal Klocek --- tests/auto/quick/dialogs/WebView.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/dialogs/WebView.qml b/tests/auto/quick/dialogs/WebView.qml index 4f8b7a0ce..01f4ac297 100644 --- a/tests/auto/quick/dialogs/WebView.qml +++ b/tests/auto/quick/dialogs/WebView.qml @@ -56,11 +56,12 @@ Window { WebEngineView { id: view anchors.fill: parent - onLoadingChanged: function(reqeust) { - if (reqeust.status === WebEngineView.LoadSucceededStatus) { + onLoadingChanged: function(request) { + if (request.status === WebEngineView.LoadSucceededStatus) { handler.ready = true - } else { - console.log("Wooohooo loading page from qrc failed !") + } else if (request.status === WebEngineView.LoadFailedStatus) { + console.log("Page was not successfully loaded from qrc! Status: " + request.status + + ", error [code: " + request.errorCode + "]: '" + request.errorString + "'") } } -- cgit v1.2.3 From 73daf5b669c943d3c7a765533c5b5d61c380a576 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 12 Jul 2019 11:23:17 +0200 Subject: Remove qt.io load from findTextInterruptedByLoad and ensure checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Load of real website is not really needed, simple html is enough to verify that on load no findText callback is executed from previous query. Ensure callback is not called with timeout and additional check inside it to verify that it's not called twise. Task-number: QTBUG-75541 Change-Id: Iebf207e40d8f4d4f680b46bb0f32480edd72f36d Reviewed-by: Jüri Valdmann Reviewed-by: Peter Varga --- tests/auto/quick/qmltests/data/tst_findText.qml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml index dfcfd586f..9687d9183 100644 --- a/tests/auto/quick/qmltests/data/tst_findText.qml +++ b/tests/auto/quick/qmltests/data/tst_findText.qml @@ -43,13 +43,21 @@ TestWebEngineView { matchCount = -1 } + function findCallbackCalled() { return matchCount != -1 } + function findTextCallback(matchCount) { + // If this starts to fail then either clear was not called before findText + // or unexpected callback was triggered from some search. + // On c++ side callback id can be checked to verify + testcase.verify(!findCallbackCalled(), 'Unexpected callback call or uncleared state before findText call!') + webEngineView.matchCount = matchCount findFailed = matchCount == 0 } TestCase { + id: testcase name: "WebViewFindText" function getBodyInnerHTML() { @@ -207,13 +215,13 @@ TestWebEngineView { webEngineView.findText("hello", findFlags, webEngineView.findTextCallback); // This should not crash. - webEngineView.url = "https://www.qt.io"; - if (!webEngineView.waitForLoadSucceeded(12000)) - skip("Couldn't load page from network, skipping test."); + webEngineView.loadHtml("New page with same hello text") + verify(webEngineView.waitForLoadSucceeded()) // The callback is not supposed to be called, see QTBUG-61506. - // Check whether the callback was called (-1 = no, other values = yes). - tryVerify(function() { return webEngineView.matchCount == -1; }, 20000); + expectFailContinue('', 'No unexpected findText callback calls occurred.') + tryVerify(function() { return webEngineView.findCallbackCalled() }) + verify(!webEngineView.findCallbackCalled()) } } } -- cgit v1.2.3 From b4589db4c7cb10cb55b38bab00d80eb1290312b1 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Mon, 15 Jul 2019 13:03:14 +0200 Subject: Reset findText reply id on StopFinding to prevent callback later Not updating lastReceivedFindReply caused next findText call after StopFinding to trigger redundant callback call on checking stale query. Fixes: QTBUG-77029 Change-Id: Iad4b71364ecb3ec3db3096b739e77620d12731f9 Reviewed-by: Peter Varga --- tests/auto/quick/qmltests/data/tst_findText.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml index 9687d9183..93aa48365 100644 --- a/tests/auto/quick/qmltests/data/tst_findText.qml +++ b/tests/auto/quick/qmltests/data/tst_findText.qml @@ -222,6 +222,10 @@ TestWebEngineView { expectFailContinue('', 'No unexpected findText callback calls occurred.') tryVerify(function() { return webEngineView.findCallbackCalled() }) verify(!webEngineView.findCallbackCalled()) + + webEngineView.clear(); + webEngineView.findText('New page', findFlags, webEngineView.findTextCallback) + tryCompare(webEngineView, 'matchCount', 1) } } } -- cgit v1.2.3