From ca4ba8beb736efcd95445cc801e2b5a77642a931 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 28 Jun 2021 15:26:45 +0200 Subject: Restore WebEngineNewViewRequest::openIn method Pick-to: 6.2 Change-Id: Ib765970d4c57f742a53cd4d2c870b00628d527aa Reviewed-by: Qt CI Bot Reviewed-by: Kirill Burtsev --- tests/auto/quick/publicapi/tst_publicapi.cpp | 5 ++++- tests/auto/quick/qmltests/data/tst_newViewRequest.qml | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/auto/quick') diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp index 46cc25514..a0db27fab 100644 --- a/tests/auto/quick/publicapi/tst_publicapi.cpp +++ b/tests/auto/quick/publicapi/tst_publicapi.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -80,6 +81,7 @@ static const QList typesToCheck = QList DestinationType" << "QWebEngineNewWindowRequest.InNewTab --> DestinationType" << "QWebEngineNewWindowRequest.InNewWindow --> DestinationType" + << "QQuickWebEngineNewViewRequest.openIn(QQuickWebEngineView*) --> void" << "QQuickWebEngineProfile.AllowPersistentCookies --> PersistentCookiesPolicy" << "QQuickWebEngineProfile.DiskHttpCache --> HttpCacheType" << "QQuickWebEngineProfile.ForcePersistentCookies --> PersistentCookiesPolicy" @@ -725,7 +728,7 @@ static const QStringList expectedAPI = QStringList() << "QQuickWebEngineView.loading --> bool" << "QQuickWebEngineView.loadingChanged(QWebEngineLoadingInfo) --> void" << "QQuickWebEngineView.navigationRequested(QWebEngineNavigationRequest*) --> void" - << "QQuickWebEngineView.newViewRequested(QWebEngineNewWindowRequest*) --> void" + << "QQuickWebEngineView.newViewRequested(QQuickWebEngineNewViewRequest*) --> void" << "QQuickWebEngineView.pdfPrintingFinished(QString,bool) --> void" << "QQuickWebEngineView.printRequested() --> void" << "QQuickWebEngineView.printToPdf(QJSValue) --> void" diff --git a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml index c79a3aee8..ac402674d 100644 --- a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml +++ b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml @@ -69,9 +69,11 @@ TestWebEngineView { "}", webEngineView); if (viewType === "dialog") - dialog.webEngineView.acceptAsNewView(request); + request.openIn(dialog.webEngineView); + else if (viewType === "null") + request.openIn(0); else if (viewType === "webEngineView") - webEngineView.acceptAsNewView(request); + request.openIn(webEngineView); } TestCase { -- cgit v1.2.3