summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt28
-rw-r--r--tests/auto/CMakeLists.txt17
-rw-r--r--tests/auto/Info.plist.in18
-rw-r--r--tests/auto/auto.pro26
-rw-r--r--tests/auto/cmake/CMakeLists.txt2
-rw-r--r--tests/auto/cmake/cmake.pro8
-rw-r--r--tests/auto/core/certificateerror/BLACKLIST2
-rw-r--r--tests/auto/core/certificateerror/certificateerror.pro3
-rw-r--r--tests/auto/core/certificateerror/tst_certificateerror.cpp23
-rw-r--r--tests/auto/core/core.pro12
-rw-r--r--tests/auto/core/devtools/devtools.pro1
-rw-r--r--tests/auto/core/origins/origins.pro8
-rw-r--r--tests/auto/core/origins/tst_origins.cpp6
-rw-r--r--tests/auto/core/origins/tst_origins.qrc23
-rw-r--r--tests/auto/core/qwebengineclientcertificatestore/qwebengineclientcertificatestore.pro1
-rw-r--r--tests/auto/core/qwebengineclientcertificatestore/tst_qwebengineclientcertificatestore.qrc8
-rw-r--r--tests/auto/core/qwebenginecookiestore/qwebenginecookiestore.pro2
-rw-r--r--tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp1
-rw-r--r--tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.qrc6
-rw-r--r--tests/auto/core/qwebenginesettings/qwebenginesettings.pro2
-rw-r--r--tests/auto/core/qwebengineurlrequestinterceptor/qwebengineurlrequestinterceptor.pro2
-rw-r--r--tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc24
-rw-r--r--tests/auto/core/tests.pri17
-rw-r--r--tests/auto/embed_info_plist.pri13
-rw-r--r--tests/auto/httpserver/httpserver.cmake7
-rw-r--r--tests/auto/pdf/CMakeLists.txt6
-rw-r--r--tests/auto/pdf/pdf.pro8
-rw-r--r--tests/auto/pdf/qpdfbookmarkmodel/CMakeLists.txt9
-rw-r--r--tests/auto/pdf/qpdfbookmarkmodel/qpdfbookmarkmodel.pro5
-rw-r--r--tests/auto/pdf/qpdfdocument/CMakeLists.txt9
-rw-r--r--tests/auto/pdf/qpdfdocument/qpdfdocument.pro6
-rw-r--r--tests/auto/pdf/qpdfpagenavigation/CMakeLists.txt8
-rw-r--r--tests/auto/pdf/qpdfpagenavigation/qpdfpagenavigation.pro5
-rw-r--r--tests/auto/pdf/qpdfpagerenderer/CMakeLists.txt9
-rw-r--r--tests/auto/pdf/qpdfpagerenderer/qpdfpagerenderer.pro5
-rw-r--r--tests/auto/pdf/qpdfsearchmodel/CMakeLists.txt8
-rw-r--r--tests/auto/pdf/qpdfsearchmodel/qpdfsearchmodel.pro5
-rw-r--r--tests/auto/quick/dialogs/WebView.qml10
-rw-r--r--tests/auto/quick/dialogs/dialogs.pro13
-rw-r--r--tests/auto/quick/dialogs/dialogs.qrc6
-rw-r--r--tests/auto/quick/inspectorserver/inspectorserver.pro4
-rw-r--r--tests/auto/quick/inspectorserver/tst_inspectorserver.cpp4
-rw-r--r--tests/auto/quick/publicapi/CMakeLists.txt1
-rw-r--r--tests/auto/quick/publicapi/publicapi.pro3
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp23
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST5
-rw-r--r--tests/auto/quick/qmltests/data/TestWebEngineView.qml16
-rw-r--r--tests/auto/quick/qmltests/data/tst_action.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_activeFocusOnPress.qml4
-rw-r--r--tests/auto/quick/qmltests/data/tst_audioMuted.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_certificateError.qml30
-rw-r--r--tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_download.qml10
-rw-r--r--tests/auto/quick/qmltests/data/tst_filePicker.qml10
-rw-r--r--tests/auto/quick/qmltests/data/tst_findText.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_fullScreenRequest.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_geopermission.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_getUserMedia.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_inputMethod.qml2
-rw-r--r--tests/auto/quick/qmltests/data/tst_keyboardEvents.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_linkHovered.qml2
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadFail.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadHtml.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadProgress.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadRecursionCrash.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadUrl.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_mouseClick.qml2
-rw-r--r--tests/auto/quick/qmltests/data/tst_mouseMove.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_navigationHistory.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_navigationRequested.qml30
-rw-r--r--tests/auto/quick/qmltests/data/tst_newViewRequest.qml32
-rw-r--r--tests/auto/quick/qmltests/data/tst_notification.qml10
-rw-r--r--tests/auto/quick/qmltests/data/tst_properties.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_runJavaScript.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_scrollPosition.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_settings.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_titleChanged.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml14
-rw-r--r--tests/auto/quick/qmltests/data/tst_userScripts.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_viewSource.qml10
-rw-r--r--tests/auto/quick/qmltests/data/tst_webchannel.qml8
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml2
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml2
-rw-r--r--tests/auto/quick/qmltests/qmltests.pro134
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp4
-rw-r--r--tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro6
-rw-r--r--tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp4
-rw-r--r--tests/auto/quick/qquickwebengineview/CMakeLists.txt1
-rw-r--r--tests/auto/quick/qquickwebengineview/qquickwebengineview.pro6
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp8
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/CMakeLists.txt1
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro4
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp2
-rw-r--r--tests/auto/quick/qtbug-70248/qtbug-70248.pro5
-rw-r--r--tests/auto/quick/qtbug-70248/test.qml6
-rw-r--r--tests/auto/quick/qtbug-70248/test.qrc5
-rw-r--r--tests/auto/quick/quick.pro16
-rw-r--r--tests/auto/quick/tests.pri20
-rw-r--r--tests/auto/quick/uidelegates/tst_uidelegates.cpp7
-rw-r--r--tests/auto/shared/http.pri4
-rw-r--r--tests/auto/shared/https.pri4
-rw-r--r--tests/auto/shared/httpsserver.qrc6
-rw-r--r--tests/auto/widgets/accessibility/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/accessibility/accessibility.pro1
-rw-r--r--tests/auto/widgets/defaultsurfaceformat/defaultsurfaceformat.pro1
-rw-r--r--tests/auto/widgets/defaultsurfaceformat/tst_defaultsurfaceformat.qrc5
-rw-r--r--tests/auto/widgets/favicon/favicon.pro1
-rw-r--r--tests/auto/widgets/favicon/tst_favicon.qrc14
-rw-r--r--tests/auto/widgets/loadsignals/loadsignals.pro2
-rw-r--r--tests/auto/widgets/loadsignals/tst_loadsignals.qrc13
-rw-r--r--tests/auto/widgets/offscreen/offscreen.pro6
-rw-r--r--tests/auto/widgets/offscreen/tst_offscreen.qrc6
-rw-r--r--tests/auto/widgets/printing/printing.pro10
-rw-r--r--tests/auto/widgets/printing/tst_printing.cpp12
-rw-r--r--tests/auto/widgets/printing/tst_printing.qrc5
-rw-r--r--tests/auto/widgets/proxy/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/proxy/proxy.pro9
-rw-r--r--tests/auto/widgets/proxypac/proxypac.pri5
-rw-r--r--tests/auto/widgets/proxypac/proxypac.pro4
-rw-r--r--tests/auto/widgets/proxypac/proxypac.qrc7
-rw-r--r--tests/auto/widgets/proxypac/proxypac_file/proxypac_file.pro9
-rw-r--r--tests/auto/widgets/proxypac/proxypac_qrc/proxypac_qrc.pro7
-rw-r--r--tests/auto/widgets/qwebenginedownloadrequest/qwebenginedownloadrequest.pro3
-rw-r--r--tests/auto/widgets/qwebenginehistory/qwebenginehistory.pro1
-rw-r--r--tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.qrc10
-rw-r--r--tests/auto/widgets/qwebenginepage/qwebenginepage.pro3
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp113
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc32
-rw-r--r--tests/auto/widgets/qwebengineprofile/qwebengineprofile.pro4
-rw-r--r--tests/auto/widgets/qwebenginescript/qwebenginescript.pro1
-rw-r--r--tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp31
-rw-r--r--tests/auto/widgets/qwebenginescript/tst_qwebenginescript.qrc11
-rw-r--r--tests/auto/widgets/qwebengineview/qwebengineview.pro2
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp18
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc11
-rw-r--r--tests/auto/widgets/schemes/schemes.pro3
-rw-r--r--tests/auto/widgets/shutdown/shutdown.pro1
-rw-r--r--tests/auto/widgets/spellchecking/CMakeLists.txt4
-rw-r--r--tests/auto/widgets/spellchecking/spellchecking.pro24
-rw-r--r--tests/auto/widgets/spellchecking/tst_spellchecking.qrc5
-rw-r--r--tests/auto/widgets/tests.pri21
-rw-r--r--tests/auto/widgets/touchinput/touchinput.pro2
-rw-r--r--tests/auto/widgets/widgets.pro47
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml2
-rw-r--r--tests/quicktestbrowser/resources.qrc8
-rw-r--r--tests/tests.pro7
148 files changed, 462 insertions, 1014 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 8d1f1a00..a8f031a5 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,27 +1 @@
-if(NOT QT_BUILD_STANDALONE_TESTS)
- cmake_minimum_required(VERSION 3.19)
-
- include(${CMAKE_CURRENT_LIST_DIR}/../.cmake.conf)
-
- project(QtWebEngineTests
- VERSION "${QT_REPO_MODULE_VERSION}"
- DESCRIPTION "Qt WebEngine Tests"
- HOMEPAGE_URL "https://qt.io/"
- LANGUAGES CXX C
- )
-
- # Make sure we use the fixed BASE argument of qt_add_resource.
- set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE)
-endif()
-
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets
- WebEngineCore WebEngineWidgets WebEngineQuick QuickWidgets Test QuickTest WebSockets)
-
-if(NOT QT_BUILD_STANDALONE_TESTS)
- qt_build_repo_begin()
- qt_build_tests()
- qt_build_repo_end()
-else()
- qt_build_tests()
-endif()
+qt_build_tests()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 2227e6e4..e000203d 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,17 +1,14 @@
-if(QT_FEATURE_qtwebengine_build
- OR (QT_BUILD_STANDALONE_TESTS AND TARGET Qt::WebEngineCore))
- add_subdirectory(core)
+if(TARGET Qt::WebEngineCore)
add_subdirectory(httpserver)
add_subdirectory(util)
+ add_subdirectory(core)
endif()
-if(QT_FEATURE_qtwebengine_quick_build
- OR (QT_BUILD_STANDALONE_TESTS AND TARGET Qt::WebEngineQuick))
+if(TARGET Qt::WebEngineQuick)
add_subdirectory(quick)
endif()
-if(QT_FEATURE_qtwebengine_widgets_build
- OR (QT_BUILD_STANDALONE_TESTS AND TARGET Qt::WebEngineWidgets))
+if(TARGET Qt::WebEngineWidgets)
add_subdirectory(widgets)
endif()
-#if(QT_FEATURE_build_qtpdf AND QT_FEATURE_webengine_qtpdf_support)
-# add_subdirectory(pdf)
-#endif()
+if(TARGET Qt::Pdf)
+ add_subdirectory(pdf)
+endif()
diff --git a/tests/auto/Info.plist.in b/tests/auto/Info.plist.in
deleted file mode 100644
index e7f31404..00000000
--- a/tests/auto/Info.plist.in
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleExecutable</key>
- <string>$${TARGET}</string>
- <key>CFBundleIdentifier</key>
- <string>org.qt-project.qt.tests.$${TARGET_HYPHENATED}</string>
- <key>CFBundleName</key>
- <string>$${TARGET}</string>
- <key>LSUIElement</key>
- <string>0</string>
-</dict>
-</plist>
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index 257c7b38..00000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-
-include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
-include($$QTWEBENGINE_OUT_ROOT/src/webenginequick/qtwebenginequick-config.pri)
-include($$QTWEBENGINE_OUT_ROOT/src/webenginewidgets/qtwebenginewidgets-config.pri)
-include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
-include($$QTWEBENGINE_OUT_ROOT/src/pdfwidgets/qtpdfwidgets-config.pri)
-
-QT_FOR_CONFIG += \
- buildtools-private \
- webenginecore-private \
- webenginequick-private \
- webenginewidgets-private \
- pdf-private \
- pdfwidgets-private
-
-TEMPLATE = subdirs
-
-qtConfig(build-qtwebengine-core):qtConfig(webengine-core-support) {
- qtConfig(webengine-quick): SUBDIRS += quick
- qtConfig(webengine-widgets): SUBDIRS += core widgets
-}
-
-qtConfig(build-qtpdf):qtConfig(webengine-qtpdf-support) {
- SUBDIRS += pdf
-}
-
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index d3c0651d..c5d7c3f9 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.16)
project(qmake_cmake_files)
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
deleted file mode 100644
index 51d30da6..00000000
--- a/tests/auto/cmake/cmake.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# Cause make to do nothing.
-TEMPLATE = subdirs
-
-CMAKE_QT_MODULES_UNDER_TEST = webengine
-qtHaveModule(widgets): CMAKE_QT_MODULES_UNDER_TEST += webenginewidgets
-
-CONFIG += ctest_testcase
diff --git a/tests/auto/core/certificateerror/BLACKLIST b/tests/auto/core/certificateerror/BLACKLIST
new file mode 100644
index 00000000..a8fd16bf
--- /dev/null
+++ b/tests/auto/core/certificateerror/BLACKLIST
@@ -0,0 +1,2 @@
+[fatalError]
+*
diff --git a/tests/auto/core/certificateerror/certificateerror.pro b/tests/auto/core/certificateerror/certificateerror.pro
deleted file mode 100644
index 73ba7515..00000000
--- a/tests/auto/core/certificateerror/certificateerror.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../tests.pri)
-include(../../shared/https.pri)
-QT *= core-private
diff --git a/tests/auto/core/certificateerror/tst_certificateerror.cpp b/tests/auto/core/certificateerror/tst_certificateerror.cpp
index a2b15a1a..3c43d997 100644
--- a/tests/auto/core/certificateerror/tst_certificateerror.cpp
+++ b/tests/auto/core/certificateerror/tst_certificateerror.cpp
@@ -43,6 +43,7 @@ public:
private Q_SLOTS:
void handleError_data();
void handleError();
+ void fatalError();
};
struct PageWithCertificateErrorHandler : QWebEnginePage
@@ -131,5 +132,27 @@ void tst_CertificateError::handleError()
QCOMPARE(toPlainTextSync(&page), expectedContent);
}
+void tst_CertificateError::fatalError()
+{
+ PageWithCertificateErrorHandler page(false, false);
+ page.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
+ QSignalSpy loadFinishedSpy(&page, &QWebEnginePage::loadFinished);
+
+ page.setUrl(QUrl("https://revoked.badssl.com"));
+ if (!loadFinishedSpy.wait(10000)) {
+ QVERIFY2(!page.error, "There shouldn't be any certificate error if not loaded due to missing internet access!");
+ QSKIP("Couldn't load page from network, skipping test.");
+ }
+
+ // revoked certificate might not be reported as invalid by chromium and the load will silently succeed
+ bool failed = !loadFinishedSpy.first().first().toBool(), hasError = bool(page.error);
+ QCOMPARE(failed, hasError);
+ if (hasError) {
+ QVERIFY(!page.error->isOverridable());
+ // Fatal certificate errors are implicitly rejected. But second call should not cause crash.
+ page.error->rejectCertificate();
+ }
+}
+
QTEST_MAIN(tst_CertificateError)
#include <tst_certificateerror.moc>
diff --git a/tests/auto/core/core.pro b/tests/auto/core/core.pro
deleted file mode 100644
index 23b25bd9..00000000
--- a/tests/auto/core/core.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = subdirs
-QT_FOR_CONFIG += network-private
-
-SUBDIRS += \
- qwebenginecookiestore \
- qwebenginesettings \
- qwebengineurlrequestinterceptor \
- devtools \
- origins
-
-qtConfig(ssl): SUBDIRS += certificateerror qwebengineclientcertificatestore
-
diff --git a/tests/auto/core/devtools/devtools.pro b/tests/auto/core/devtools/devtools.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/core/devtools/devtools.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/core/origins/origins.pro b/tests/auto/core/origins/origins.pro
deleted file mode 100644
index 6cf0b2b9..00000000
--- a/tests/auto/core/origins/origins.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
-
-qtConfig(webengine-webchannel):qtHaveModule(websockets) {
- QT += websockets
- DEFINES += WEBSOCKETS
-}
-
diff --git a/tests/auto/core/origins/tst_origins.cpp b/tests/auto/core/origins/tst_origins.cpp
index 1aeb3628..a8ec5b7b 100644
--- a/tests/auto/core/origins/tst_origins.cpp
+++ b/tests/auto/core/origins/tst_origins.cpp
@@ -553,10 +553,10 @@ void tst_Origins::mixedSchemes()
QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadButNotAccess")));
QVERIFY(verifyLoad(QSL("qrc:/resources/mixedSchemes.html")));
- QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Uncaught SecurityError")));
+ QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Not allowed to load local resource")));
eval("setIFrameUrl('file:" + QDir(QT_TESTCASE_SOURCEDIR).canonicalPath()
+ "/resources/mixedSchemes_frame.html')");
- QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadButNotAccess")));
+ QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("cannotLoad")));
eval(QSL("setIFrameUrl('qrc:/resources/mixedSchemes_frame.html')"));
QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadAndAccess")));
QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Uncaught SecurityError")));
@@ -672,7 +672,7 @@ void tst_Origins::mixedXHR_data()
QTest::newRow("file->cors") << QString("file:" + QDir(QT_TESTCASE_SOURCEDIR).canonicalPath()
+ "/resources/mixedXHR.html")
<< QString("sendXHR('cors:/resources/mixedXHR.txt')")
- << QVariant(QString("ok"));
+ << QVariant(QString("error"));
QTest::newRow("qrc->file") << QString("qrc:/resources/mixedXHR.html")
<< QString("sendXHR('file:"
diff --git a/tests/auto/core/origins/tst_origins.qrc b/tests/auto/core/origins/tst_origins.qrc
deleted file mode 100644
index ae524537..00000000
--- a/tests/auto/core/origins/tst_origins.qrc
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
-<qresource>
- <file>resources/createObjectURL.html</file>
- <file>resources/dedicatedWorker.html</file>
- <file>resources/dedicatedWorker.js</file>
- <file>resources/mixedSchemes.html</file>
- <file>resources/mixedSchemesWithCsp.html</file>
- <file>resources/mixedSchemes_frame.html</file>
- <file>resources/mixedXHR.html</file>
- <file>resources/mixedXHR.txt</file>
- <file>resources/serviceWorker.html</file>
- <file>resources/serviceWorker.js</file>
- <file>resources/sharedWorker.html</file>
- <file>resources/sharedWorker.js</file>
- <file>resources/subdir/frame2.html</file>
- <file>resources/subdir/index.html</file>
- <file>resources/subdir_frame1.html</file>
- <file>resources/viewSource.html</file>
- <file>resources/websocket.html</file>
- <file>resources/websocket2.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/core/qwebengineclientcertificatestore/qwebengineclientcertificatestore.pro b/tests/auto/core/qwebengineclientcertificatestore/qwebengineclientcertificatestore.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/core/qwebengineclientcertificatestore/qwebengineclientcertificatestore.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/core/qwebengineclientcertificatestore/tst_qwebengineclientcertificatestore.qrc b/tests/auto/core/qwebengineclientcertificatestore/tst_qwebengineclientcertificatestore.qrc
deleted file mode 100644
index db481fef..00000000
--- a/tests/auto/core/qwebengineclientcertificatestore/tst_qwebengineclientcertificatestore.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>resources/certificate.crt</file>
- <file>resources/privatekey.key</file>
- <file>resources/certificate1.crt</file>
- <file>resources/privatekey1.key</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/core/qwebenginecookiestore/qwebenginecookiestore.pro b/tests/auto/core/qwebenginecookiestore/qwebenginecookiestore.pro
deleted file mode 100644
index 9c239f1a..00000000
--- a/tests/auto/core/qwebenginecookiestore/qwebenginecookiestore.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
diff --git a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
index ef3b8469..a712fb28 100644
--- a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
+++ b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
@@ -28,7 +28,6 @@
#include <util.h>
#include <QtTest/QtTest>
-#include <QtWebEngineCore/qwebenginecallback.h>
#include <QtWebEngineCore/qwebenginecookiestore.h>
#include <QtWebEngineCore/qwebengineprofile.h>
#include <QtWebEngineCore/qwebenginepage.h>
diff --git a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.qrc b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.qrc
deleted file mode 100644
index afeae268..00000000
--- a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/index.html</file>
- <file>resources/content.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/core/qwebenginesettings/qwebenginesettings.pro b/tests/auto/core/qwebenginesettings/qwebenginesettings.pro
deleted file mode 100644
index 70786e70..00000000
--- a/tests/auto/core/qwebenginesettings/qwebenginesettings.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-QT *= core-private gui-private
diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/qwebengineurlrequestinterceptor.pro b/tests/auto/core/qwebengineurlrequestinterceptor/qwebengineurlrequestinterceptor.pro
deleted file mode 100644
index 9c239f1a..00000000
--- a/tests/auto/core/qwebengineurlrequestinterceptor/qwebengineurlrequestinterceptor.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc
deleted file mode 100644
index 6a34635f..00000000
--- a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.qrc
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
- <qresource prefix="/">
- <file>resources/content.html</file>
- <file>resources/favicon.html</file>
- <file>resources/firstparty.html</file>
- <file>resources/fontawesome.woff</file>
- <file>resources/iframe.html</file>
- <file>resources/iframe2.html</file>
- <file>resources/iframe3.html</file>
- <file>resources/image.html</file>
- <file>resources/image_in_iframe.html</file>
- <file>resources/index.html</file>
- <file>resources/media.html</file>
- <file>resources/media.mp4</file>
- <file>resources/media_in_iframe.html</file>
- <file>resources/resource.html</file>
- <file>resources/resource_in_iframe.html</file>
- <file>resources/script.js</file>
- <file>resources/style.css</file>
- <file>resources/sw.html</file>
- <file>resources/sw.js</file>
- <file>resources/icons/favicon.png</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/core/tests.pri b/tests/auto/core/tests.pri
deleted file mode 100644
index 2f34f173..00000000
--- a/tests/auto/core/tests.pri
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-
-CONFIG += testcase
-
-VPATH += $$_PRO_FILE_PWD_
-TARGET = tst_$$TARGET
-
-SOURCES += $${TARGET}.cpp
-INCLUDEPATH += $$PWD
-
-exists($$_PRO_FILE_PWD_/$${TARGET}.qrc): RESOURCES += $${TARGET}.qrc
-
-QT += testlib network webenginecore
-
-# This define is used by some tests to look up resources in the source tree
-DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
-include(../embed_info_plist.pri)
diff --git a/tests/auto/embed_info_plist.pri b/tests/auto/embed_info_plist.pri
deleted file mode 100644
index cca93c35..00000000
--- a/tests/auto/embed_info_plist.pri
+++ /dev/null
@@ -1,13 +0,0 @@
-macos {
- CONFIG -= app_bundle
-
- # QTBUG-57354 embed Info.plist so that certain fonts can be found in non-bundle apps
- out_info = $$OUT_PWD/Info.plist
- embed_info_plist.input = $$PWD/Info.plist.in
- embed_info_plist.output = $$out_info
- TARGET_HYPHENATED = $$replace(TARGET, [^a-zA-Z0-9-.], -)
- QMAKE_SUBSTITUTES += embed_info_plist
- QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$shell_quote($$out_info)
- PRE_TARGETDEPS += $$out_info
- QMAKE_DISTCLEAN += $$out_info
-}
diff --git a/tests/auto/httpserver/httpserver.cmake b/tests/auto/httpserver/httpserver.cmake
index e10c52b7..84b350c0 100644
--- a/tests/auto/httpserver/httpserver.cmake
+++ b/tests/auto/httpserver/httpserver.cmake
@@ -1,9 +1,5 @@
if (NOT TARGET Test::HttpServer)
- set(CMAKE_AUTOMOC ON)
- set(CMAKE_AUTORCC ON)
- set(CMAKE_AUTOUIC ON)
-
add_library(httpserver STATIC
${CMAKE_CURRENT_LIST_DIR}/httpreqrep.cpp
${CMAKE_CURRENT_LIST_DIR}/httpreqrep.h
@@ -13,6 +9,9 @@ if (NOT TARGET Test::HttpServer)
${CMAKE_CURRENT_LIST_DIR}/proxy_server.cpp
)
+ # moc binary might not exist in case of top level build
+ qt_autogen_tools(httpserver ENABLE_AUTOGEN_TOOLS "moc")
+
if(QT_FEATURE_ssl)
target_sources(httpserver INTERFACE ${CMAKE_CURRENT_LIST_DIR}/httpsserver.h)
endif()
diff --git a/tests/auto/pdf/CMakeLists.txt b/tests/auto/pdf/CMakeLists.txt
new file mode 100644
index 00000000..1220581c
--- /dev/null
+++ b/tests/auto/pdf/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(qpdfbookmarkmodel)
+add_subdirectory(qpdfpagenavigation)
+add_subdirectory(qpdfpagerenderer)
+if(TARGET Qt::PrintSupport)
+ add_subdirectory(qpdfdocument)
+endif()
diff --git a/tests/auto/pdf/pdf.pro b/tests/auto/pdf/pdf.pro
deleted file mode 100644
index a2b3fcff..00000000
--- a/tests/auto/pdf/pdf.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS = \
- qpdfbookmarkmodel \
- qpdfpagenavigation \
- qpdfpagerenderer
-
-qtHaveModule(printsupport): SUBDIRS += qpdfdocument
diff --git a/tests/auto/pdf/qpdfbookmarkmodel/CMakeLists.txt b/tests/auto/pdf/qpdfbookmarkmodel/CMakeLists.txt
new file mode 100644
index 00000000..f0300ce7
--- /dev/null
+++ b/tests/auto/pdf/qpdfbookmarkmodel/CMakeLists.txt
@@ -0,0 +1,9 @@
+qt_internal_add_test(tst_qpdfbookmarkmodel
+ SOURCES
+ tst_qpdfbookmarkmodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Pdf
+)
+
diff --git a/tests/auto/pdf/qpdfbookmarkmodel/qpdfbookmarkmodel.pro b/tests/auto/pdf/qpdfbookmarkmodel/qpdfbookmarkmodel.pro
deleted file mode 100644
index 11a01063..00000000
--- a/tests/auto/pdf/qpdfbookmarkmodel/qpdfbookmarkmodel.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qpdfbookmarkmodel
-QT += pdf testlib network
-macos:CONFIG -= app_bundle
-SOURCES += tst_qpdfbookmarkmodel.cpp
diff --git a/tests/auto/pdf/qpdfdocument/CMakeLists.txt b/tests/auto/pdf/qpdfdocument/CMakeLists.txt
new file mode 100644
index 00000000..4551fdb6
--- /dev/null
+++ b/tests/auto/pdf/qpdfdocument/CMakeLists.txt
@@ -0,0 +1,9 @@
+qt_internal_add_test(tst_qpdfdocument
+ SOURCES
+ tst_qpdfdocument.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::PrintSupport
+ Qt::Pdf
+)
diff --git a/tests/auto/pdf/qpdfdocument/qpdfdocument.pro b/tests/auto/pdf/qpdfdocument/qpdfdocument.pro
deleted file mode 100644
index 8382a25e..00000000
--- a/tests/auto/pdf/qpdfdocument/qpdfdocument.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qpdfdocument
-QT += pdf printsupport testlib network
-macx:CONFIG -= app_bundle
-SOURCES += tst_qpdfdocument.cpp
-
diff --git a/tests/auto/pdf/qpdfpagenavigation/CMakeLists.txt b/tests/auto/pdf/qpdfpagenavigation/CMakeLists.txt
new file mode 100644
index 00000000..12ece750
--- /dev/null
+++ b/tests/auto/pdf/qpdfpagenavigation/CMakeLists.txt
@@ -0,0 +1,8 @@
+qt_internal_add_test(tst_qpdfpagenavigation
+ SOURCES
+ tst_qpdfpagenavigation.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Pdf
+)
diff --git a/tests/auto/pdf/qpdfpagenavigation/qpdfpagenavigation.pro b/tests/auto/pdf/qpdfpagenavigation/qpdfpagenavigation.pro
deleted file mode 100644
index 8de99543..00000000
--- a/tests/auto/pdf/qpdfpagenavigation/qpdfpagenavigation.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qpdfpagenavigation
-QT += pdf testlib network
-macos:CONFIG -= app_bundle
-SOURCES += tst_qpdfpagenavigation.cpp
diff --git a/tests/auto/pdf/qpdfpagerenderer/CMakeLists.txt b/tests/auto/pdf/qpdfpagerenderer/CMakeLists.txt
new file mode 100644
index 00000000..f4084cce
--- /dev/null
+++ b/tests/auto/pdf/qpdfpagerenderer/CMakeLists.txt
@@ -0,0 +1,9 @@
+qt_internal_add_test(tst_qpdfpagerenderer
+ SOURCES
+ tst_qpdfpagerenderer.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Pdf
+)
+
diff --git a/tests/auto/pdf/qpdfpagerenderer/qpdfpagerenderer.pro b/tests/auto/pdf/qpdfpagerenderer/qpdfpagerenderer.pro
deleted file mode 100644
index 9ccb4e82..00000000
--- a/tests/auto/pdf/qpdfpagerenderer/qpdfpagerenderer.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qpdfpagerenderer
-QT += pdf testlib network
-macos:CONFIG -= app_bundle
-SOURCES += tst_qpdfpagerenderer.cpp
diff --git a/tests/auto/pdf/qpdfsearchmodel/CMakeLists.txt b/tests/auto/pdf/qpdfsearchmodel/CMakeLists.txt
new file mode 100644
index 00000000..2c3e744d
--- /dev/null
+++ b/tests/auto/pdf/qpdfsearchmodel/CMakeLists.txt
@@ -0,0 +1,8 @@
+qt_internal_add_test(tst_qpdfsearchmodel
+ SOURCES
+ tst_qpdfsearchmodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Pdf
+)
diff --git a/tests/auto/pdf/qpdfsearchmodel/qpdfsearchmodel.pro b/tests/auto/pdf/qpdfsearchmodel/qpdfsearchmodel.pro
deleted file mode 100644
index 205fef17..00000000
--- a/tests/auto/pdf/qpdfsearchmodel/qpdfsearchmodel.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qpdfsearchmodel
-QT += pdf testlib network
-macos:CONFIG -= app_bundle
-SOURCES += tst_qpdfsearchmodel.cpp
diff --git a/tests/auto/quick/dialogs/WebView.qml b/tests/auto/quick/dialogs/WebView.qml
index 01f4ac29..29b5d2ca 100644
--- a/tests/auto/quick/dialogs/WebView.qml
+++ b/tests/auto/quick/dialogs/WebView.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtWebEngine 1.4
-import QtQuick.Window 2.0
-import QtTest 1.0
-import io.qt.tester 1.0
+import QtQuick
+import QtWebEngine
+import QtQuick.Window
+import QtTest
+import io.qt.tester
Window {
width: 50
diff --git a/tests/auto/quick/dialogs/dialogs.pro b/tests/auto/quick/dialogs/dialogs.pro
deleted file mode 100644
index 79952d8e..00000000
--- a/tests/auto/quick/dialogs/dialogs.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-include(../tests.pri)
-QT += core-private webenginequick webenginequick-private
-
-HEADERS += \
- server.h \
- testhandler.h
-
-SOURCES += \
- server.cpp \
- testhandler.cpp
-
-RESOURCES += \
- dialogs.qrc
diff --git a/tests/auto/quick/dialogs/dialogs.qrc b/tests/auto/quick/dialogs/dialogs.qrc
deleted file mode 100644
index a0715dbc..00000000
--- a/tests/auto/quick/dialogs/dialogs.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>index.html</file>
- <file>WebView.qml</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/quick/inspectorserver/inspectorserver.pro b/tests/auto/quick/inspectorserver/inspectorserver.pro
deleted file mode 100644
index 5110a3ae..00000000
--- a/tests/auto/quick/inspectorserver/inspectorserver.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-include(../tests.pri)
-QT += webenginequick
-QT_PRIVATE += core-private webenginequick-private webenginecore-private
-DEFINES += IMPORT_DIR=\"\\\"$${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP}imports\\\"\"
diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
index 2879895c..7b85c734 100644
--- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
+++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
@@ -72,8 +72,8 @@ void tst_InspectorServer::prepareWebViewComponent()
static QQmlEngine* engine = new QQmlEngine(this);
m_component.reset(new QQmlComponent(engine, this));
- m_component->setData(QByteArrayLiteral("import QtQuick 2.0\n"
- "import QtWebEngine 1.2\n"
+ m_component->setData(QByteArrayLiteral("import QtQuick\n"
+ "import QtWebEngine\n"
"WebEngineView { }")
, QUrl());
}
diff --git a/tests/auto/quick/publicapi/CMakeLists.txt b/tests/auto/quick/publicapi/CMakeLists.txt
index abed54a1..4fa18e0b 100644
--- a/tests/auto/quick/publicapi/CMakeLists.txt
+++ b/tests/auto/quick/publicapi/CMakeLists.txt
@@ -4,5 +4,4 @@ qt_internal_add_test(tst_publicapi
LIBRARIES
Qt::CorePrivate
Qt::WebEngineQuickPrivate
- Qt::WebEngineWidgetsPrivate
)
diff --git a/tests/auto/quick/publicapi/publicapi.pro b/tests/auto/quick/publicapi/publicapi.pro
deleted file mode 100644
index bb0e03f6..00000000
--- a/tests/auto/quick/publicapi/publicapi.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../tests.pri)
-QT += webenginequick
-QT_PRIVATE += core-private webenginequick-private webenginecore-private
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index fe0b9d2b..c8e09f1c 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -52,7 +52,7 @@
#include <private/qquickwebengineclientcertificateselection_p.h>
#include <private/qquickwebenginedialogrequests_p.h>
#include <private/qquickwebenginedownloadrequest_p.h>
-#include <private/qquickwebenginenewviewrequest_p.h>
+#include <private/qquickwebenginenewwindowrequest_p.h>
#include <private/qquickwebenginesettings_p.h>
#include <private/qquickwebenginesingleton_p.h>
@@ -80,7 +80,7 @@ static const QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *
<< &QQuickWebEngineJavaScriptDialogRequest::staticMetaObject
<< &QQuickWebEngineColorDialogRequest::staticMetaObject
<< &QQuickWebEngineFileDialogRequest::staticMetaObject
- << &QQuickWebEngineNewViewRequest::staticMetaObject
+ << &QQuickWebEngineNewWindowRequest::staticMetaObject
<< &QQuickWebEngineTooltipRequest::staticMetaObject
<< &QWebEngineContextMenuRequest::staticMetaObject
<< &QWebEngineCertificateError::staticMetaObject
@@ -343,7 +343,7 @@ static const QStringList expectedAPI = QStringList()
<< "QWebEngineNewWindowRequest.InNewDialog --> DestinationType"
<< "QWebEngineNewWindowRequest.InNewTab --> DestinationType"
<< "QWebEngineNewWindowRequest.InNewWindow --> DestinationType"
- << "QQuickWebEngineNewViewRequest.openIn(QQuickWebEngineView*) --> void"
+ << "QQuickWebEngineNewWindowRequest.openIn(QQuickWebEngineView*) --> void"
<< "QQuickWebEngineProfile.AllowPersistentCookies --> PersistentCookiesPolicy"
<< "QQuickWebEngineProfile.DiskHttpCache --> HttpCacheType"
<< "QQuickWebEngineProfile.ForcePersistentCookies --> PersistentCookiesPolicy"
@@ -715,7 +715,20 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.loading --> bool"
<< "QQuickWebEngineView.loadingChanged(QWebEngineLoadingInfo) --> void"
<< "QQuickWebEngineView.navigationRequested(QWebEngineNavigationRequest*) --> void"
- << "QQuickWebEngineView.newViewRequested(QQuickWebEngineNewViewRequest*) --> void"
+ << "QQuickWebEngineView.newWindowRequested(QQuickWebEngineNewWindowRequest*) --> void"
+ << "QQuickWebEngineView.AcceptRequest --> NavigationRequestAction"
+ << "QQuickWebEngineView.IgnoreRequest --> NavigationRequestAction"
+ << "QQuickWebEngineView.BackForwardNavigation --> NavigationType"
+ << "QQuickWebEngineView.FormSubmittedNavigation --> NavigationType"
+ << "QQuickWebEngineView.LinkClickedNavigation --> NavigationType"
+ << "QQuickWebEngineView.OtherNavigation --> NavigationType"
+ << "QQuickWebEngineView.RedirectNavigation --> NavigationType"
+ << "QQuickWebEngineView.ReloadNavigation --> NavigationType"
+ << "QQuickWebEngineView.TypedNavigation --> NavigationType"
+ << "QQuickWebEngineView.NewViewInBackgroundTab --> NewViewDestination"
+ << "QQuickWebEngineView.NewViewInDialog --> NewViewDestination"
+ << "QQuickWebEngineView.NewViewInTab --> NewViewDestination"
+ << "QQuickWebEngineView.NewViewInWindow --> NewViewDestination"
<< "QQuickWebEngineView.pdfPrintingFinished(QString,bool) --> void"
<< "QQuickWebEngineView.printRequested() --> void"
<< "QQuickWebEngineView.printToPdf(QJSValue) --> void"
@@ -764,7 +777,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.windowCloseRequested() --> void"
<< "QQuickWebEngineView.zoomFactor --> double"
<< "QQuickWebEngineView.zoomFactorChanged(double) --> void"
- << "QQuickWebEngineView.acceptAsNewView(QWebEngineNewWindowRequest*) --> void"
+ << "QQuickWebEngineView.acceptAsNewWindow(QWebEngineNewWindowRequest*) --> void"
<< "QWebEngineQuotaRequest.accept() --> void"
<< "QWebEngineQuotaRequest.origin --> QUrl"
<< "QWebEngineQuotaRequest.reject() --> void"
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index f4d7d98d..f4009e16 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -1,5 +1,8 @@
-[NewViewRequest::test_loadNewViewRequest]
+[NewWindowRequest::test_loadNewWindowRequest]
macos
[WebEngineViewContextMenu::test_contextMenuLinkAndSelectedText]
macos
+
+[CertificateError::test_fatalError]
+*
diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
index aa9d67d9..68417c6c 100644
--- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml
+++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
@@ -35,19 +35,29 @@ WebEngineView {
property bool windowCloseRequestedSignalEmitted: false
settings.focusOnNavigationEnabled: true
+ function loadSucceeded() { return loadStatus == WebEngineView.LoadSucceededStatus }
+ function loadFailed() { return loadStatus == WebEngineView.LoadFailedStatus }
+ function loadStopped() { return loadStatus == WebEngineView.LoadStoppedStatus }
+
+ function waitForLoadResult(timeout) {
+ loadStatus = null
+ var r = _waitFor(function() { return loadStatus != null && loadStatus != WebEngineView.LoadStartedStatus }, timeout)
+ return r
+ }
+
function waitForLoadSucceeded(timeout) {
- var success = _waitFor(function() { return loadStatus == WebEngineView.LoadSucceededStatus }, timeout)
loadStatus = null
+ var success = _waitFor(function() { return loadStatus == WebEngineView.LoadSucceededStatus }, timeout)
return success
}
function waitForLoadFailed(timeout) {
- var failure = _waitFor(function() { return loadStatus == WebEngineView.LoadFailedStatus }, timeout)
loadStatus = null
+ var failure = _waitFor(function() { return loadStatus == WebEngineView.LoadFailedStatus }, timeout)
return failure
}
function waitForLoadStopped(timeout) {
- var stop = _waitFor(function() { return loadStatus == WebEngineView.LoadStoppedStatus }, timeout)
loadStatus = null
+ var stop = _waitFor(function() { return loadStatus == WebEngineView.LoadStoppedStatus }, timeout)
return stop
}
function waitForWindowCloseRequested() {
diff --git a/tests/auto/quick/qmltests/data/tst_action.qml b/tests/auto/quick/qmltests/data/tst_action.qml
index 91f260e0..554f0929 100644
--- a/tests/auto/quick/qmltests/data/tst_action.qml
+++ b/tests/auto/quick/qmltests/data/tst_action.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.8
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_activeFocusOnPress.qml b/tests/auto/quick/qmltests/data/tst_activeFocusOnPress.qml
index 83a2dc8c..d423bdd1 100644
--- a/tests/auto/quick/qmltests/data/tst_activeFocusOnPress.qml
+++ b/tests/auto/quick/qmltests/data/tst_activeFocusOnPress.qml
@@ -26,8 +26,8 @@
**
****************************************************************************/
-import QtQuick 2.5
-import QtTest 1.0
+import QtQuick
+import QtTest
Item {
id: root
diff --git a/tests/auto/quick/qmltests/data/tst_audioMuted.qml b/tests/auto/quick/qmltests/data/tst_audioMuted.qml
index d0d9e35c..c6a882f5 100644
--- a/tests/auto/quick/qmltests/data/tst_audioMuted.qml
+++ b/tests/auto/quick/qmltests/data/tst_audioMuted.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.4
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: view
diff --git a/tests/auto/quick/qmltests/data/tst_certificateError.qml b/tests/auto/quick/qmltests/data/tst_certificateError.qml
index a707f4a7..a9031896 100644
--- a/tests/auto/quick/qmltests/data/tst_certificateError.qml
+++ b/tests/auto/quick/qmltests/data/tst_certificateError.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.9
+import QtQuick
+import QtTest
+import QtWebEngine
-import Test.Shared 1.0 as Shared
+import Test.Shared as Shared
TestWebEngineView {
id: view; width: 320; height: 320
@@ -121,5 +121,27 @@ TestWebEngineView {
verify(error.overridable)
compare(error.type, WebEngineCertificateError.CertificateAuthorityInvalid)
}
+
+ function test_fatalError() {
+ let error = undefined
+ var handleCertificateError = function(e) { error = e; }
+ view.certificateError.connect(handleCertificateError);
+
+ view.url = Qt.resolvedUrl('https://revoked.badssl.com');
+ if (!view.waitForLoadResult()) {
+ verify(!error, "There shouldn't be any certificate error if not loaded due to missing internet access!");
+ skip("Couldn't load page from network, skipping test.");
+ }
+ view.certificateError.disconnect(handleCertificateError);
+
+ // revoked certificate might not be reported as invalid by chromium and the load will silently succeed
+ const failed = view.loadStatus == WebEngineView.LoadFailedStatus, hasError = Boolean(error)
+ compare(hasError, failed)
+ if (failed) {
+ verify(!error.overridable);
+ // Fatal certificate errors are implicitly rejected. But second call should not cause crash.
+ error.rejectCertificate();
+ }
+ }
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml b/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml
index 78029434..8ab9925d 100644
--- a/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml
+++ b/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
@@ -44,7 +44,7 @@ TestWebEngineView {
signalName: "linkHovered"
}
- onLinkHovered: {
+ onLinkHovered: function(hoveredUrl) {
webEngineView.lastUrl = hoveredUrl
}
diff --git a/tests/auto/quick/qmltests/data/tst_download.qml b/tests/auto/quick/qmltests/data/tst_download.qml
index bac4d5cc..93c430a5 100644
--- a/tests/auto/quick/qmltests/data/tst_download.qml
+++ b/tests/auto/quick/qmltests/data/tst_download.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.10
-import Qt.labs.platform 1.0
-import Test.util 1.0
+import QtQuick
+import QtTest
+import QtWebEngine
+import Qt.labs.platform
+import Test.util
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml
index 5b963c7b..475718c3 100644
--- a/tests/auto/quick/qmltests/data/tst_filePicker.qml
+++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
-import "../../qmltests/data" 1.0
-import "../mock-delegates/TestParams" 1.0
+import QtQuick
+import QtTest
+import QtWebEngine
+import "../../qmltests/data"
+import "../mock-delegates/TestParams"
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml
index 0b4a8d45..874f6184 100644
--- a/tests/auto/quick/qmltests/data/tst_findText.qml
+++ b/tests/auto/quick/qmltests/data/tst_findText.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml b/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml
index b2b7374f..7ed684f7 100644
--- a/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml
+++ b/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.5
-import QtTest 1.0
-import QtWebEngine 1.4
+import QtQuick
+import QtTest
+import QtWebEngine
Item {
id: container
diff --git a/tests/auto/quick/qmltests/data/tst_fullScreenRequest.qml b/tests/auto/quick/qmltests/data/tst_fullScreenRequest.qml
index 2d9247b2..c7996a11 100644
--- a/tests/auto/quick/qmltests/data/tst_fullScreenRequest.qml
+++ b/tests/auto/quick/qmltests/data/tst_fullScreenRequest.qml
@@ -1,6 +1,6 @@
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.9
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: view
diff --git a/tests/auto/quick/qmltests/data/tst_geopermission.qml b/tests/auto/quick/qmltests/data/tst_geopermission.qml
index 9f613abf..d16e94d8 100644
--- a/tests/auto/quick/qmltests/data/tst_geopermission.qml
+++ b/tests/auto/quick/qmltests/data/tst_geopermission.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.1
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
@@ -44,7 +44,7 @@ TestWebEngineView {
signalName: "featurePermissionRequested"
}
- onFeaturePermissionRequested: {
+ onFeaturePermissionRequested: function(securityOrigin, feature) {
if (feature === WebEngineView.Geolocation) {
geoPermissionRequested = true
if (deniedGeolocation) {
diff --git a/tests/auto/quick/qmltests/data/tst_getUserMedia.qml b/tests/auto/quick/qmltests/data/tst_getUserMedia.qml
index 4cfbbf09..fe2d9101 100644
--- a/tests/auto/quick/qmltests/data/tst_getUserMedia.qml
+++ b/tests/auto/quick/qmltests/data/tst_getUserMedia.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.6
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
@@ -143,7 +143,7 @@ TestWebEngineView {
property variant requestedFeature
property variant requestedSecurityOrigin
- onFeaturePermissionRequested: {
+ onFeaturePermissionRequested: function(securityOrigin, feature) {
requestedFeature = feature
requestedSecurityOrigin = securityOrigin
}
diff --git a/tests/auto/quick/qmltests/data/tst_inputMethod.qml b/tests/auto/quick/qmltests/data/tst_inputMethod.qml
index 16b7a06d..0b7135bb 100644
--- a/tests/auto/quick/qmltests/data/tst_inputMethod.qml
+++ b/tests/auto/quick/qmltests/data/tst_inputMethod.qml
@@ -30,7 +30,7 @@ import QtQuick
import QtTest
import QtWebEngine
import Test.util
-import "../../qmltests/data" 1.0
+import "../../qmltests/data"
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml b/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml
index 136863c4..7c594d92 100644
--- a/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml
+++ b/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.4
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml b/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
index e0a8c0a4..f37cdf4b 100644
--- a/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
+++ b/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_linkHovered.qml b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
index d21d7443..a1343cbe 100644
--- a/tests/auto/quick/qmltests/data/tst_linkHovered.qml
+++ b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
@@ -29,7 +29,7 @@
import QtQuick
import QtTest
import QtWebEngine
-import "../../qmltests/data" 1.0
+import "../../qmltests/data"
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml
index 58d6b9e3..73a3833e 100644
--- a/tests/auto/quick/qmltests/data/tst_loadFail.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml
@@ -26,10 +26,10 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
-import "../../qmltests/data" 1.0
+import QtQuick
+import QtTest
+import QtWebEngine
+import "../../qmltests/data"
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_loadHtml.qml b/tests/auto/quick/qmltests/data/tst_loadHtml.qml
index 6ed9a431..c4ed9ed3 100644
--- a/tests/auto/quick/qmltests/data/tst_loadHtml.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadHtml.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_loadProgress.qml b/tests/auto/quick/qmltests/data/tst_loadProgress.qml
index 7bfe1d9e..e4aa2d88 100644
--- a/tests/auto/quick/qmltests/data/tst_loadProgress.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadProgress.qml
@@ -26,11 +26,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
-import Test.Shared 1.0 as Shared
+import Test.Shared as Shared
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_loadRecursionCrash.qml b/tests/auto/quick/qmltests/data/tst_loadRecursionCrash.qml
index 81a0f090..9d8de0a5 100644
--- a/tests/auto/quick/qmltests/data/tst_loadRecursionCrash.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadRecursionCrash.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.3
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
Item {
width: 300
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
index 3a2341fc..c331fab6 100644
--- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_mouseClick.qml b/tests/auto/quick/qmltests/data/tst_mouseClick.qml
index 647c8457..d75298a6 100644
--- a/tests/auto/quick/qmltests/data/tst_mouseClick.qml
+++ b/tests/auto/quick/qmltests/data/tst_mouseClick.qml
@@ -30,7 +30,7 @@ import QtQuick
import QtTest
import QtWebEngine
import Test.util
-import "../../qmltests/data" 1.0
+import "../../qmltests/data"
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_mouseMove.qml b/tests/auto/quick/qmltests/data/tst_mouseMove.qml
index adfa3941..6afab7aa 100644
--- a/tests/auto/quick/qmltests/data/tst_mouseMove.qml
+++ b/tests/auto/quick/qmltests/data/tst_mouseMove.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.4
+import QtQuick
+import QtTest
+import QtWebEngine
Rectangle {
id: root
diff --git a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
index d5073bef..c7edb05b 100644
--- a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
+++ b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.15
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
index 462dc829..b3e247c4 100644
--- a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
+++ b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
@@ -94,19 +94,17 @@ TestWebEngineView {
// Test if we get notified about main frame and iframe loads
compare(navigationSpy.count, 0)
webEngineView.url = Qt.resolvedUrl("test-iframe.html")
- navigationSpy.wait()
+ verify(webEngineView.waitForLoadSucceeded())
compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html"))
- navigationSpy.wait()
compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html"))
compare(navigationSpy.count, 2)
- verify(webEngineView.waitForLoadSucceeded())
// Test if we get notified about clicked links
mouseClick(webEngineView, 100, 100)
- tryCompare(navigationSpy, "count", 3)
+ verify(webEngineView.waitForLoadSucceeded())
compare(attributes.mainUrl, Qt.resolvedUrl("test1.html"))
verify(attributes.linkClickedNavigationRequested)
- verify(webEngineView.waitForLoadSucceeded())
+ compare(navigationSpy.count, 3)
}
function test_ignoreLinkClickedRequest() {
@@ -117,26 +115,28 @@ TestWebEngineView {
shouldIgnoreLinkClicks = true
mouseClick(webEngineView, 100, 100)
- tryCompare(navigationSpy, "count", 3)
- compare(attributes.mainUrl, Qt.resolvedUrl("test1.html"))
- verify(attributes.linkClickedNavigationRequested)
- verify(attributes.linkClickedNavigationIgnored)
// We ignored the main frame request, so we should
// get notified that the load has been stopped.
verify(webEngineView.waitForLoadStopped())
verify(!webEngineView.loading)
+
+ compare(navigationSpy.count, 3)
+ compare(attributes.mainUrl, Qt.resolvedUrl("test1.html"))
+ verify(attributes.linkClickedNavigationRequested)
+ verify(attributes.linkClickedNavigationIgnored)
}
function test_ignoreSubFrameRequest() {
// Test if we can ignore sub frame requests
shouldIgnoreSubFrameRequests = true
webEngineView.url = Qt.resolvedUrl("test-iframe.html")
- tryCompare(navigationSpy, "count", 2)
- compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html"))
- compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html"))
// We ignored the sub frame request, so
// the main frame load should still succeed.
verify(webEngineView.waitForLoadSucceeded())
+
+ compare(navigationSpy.count, 2)
+ compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html"))
+ compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html"))
}
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml
index ac402674..6e1ebc92 100644
--- a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml
+++ b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.5
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
@@ -49,10 +49,10 @@ TestWebEngineView {
SignalSpy {
id: newViewRequestedSpy
target: webEngineView
- signalName: "newViewRequested"
+ signalName: "newWindowRequested"
}
- onNewViewRequested: function(request) {
+ onNewWindowRequested: function(request) {
newViewRequest = {
"destination": request.destination,
"userInitiated": request.userInitiated,
@@ -60,7 +60,7 @@ TestWebEngineView {
};
dialog = Qt.createQmlObject(
- "import QtQuick.Window 2.0\n" +
+ "import QtQuick.Window\n" +
"Window {\n" +
" width: 100; height: 100\n" +
" visible: true; flags: Qt.Dialog\n" +
@@ -78,7 +78,7 @@ TestWebEngineView {
TestCase {
id: testCase
- name: "NewViewRequest"
+ name: "NewWindowRequest"
when: windowShown
function init() {
@@ -96,7 +96,7 @@ TestWebEngineView {
dialog.destroy();
}
- function test_loadNewViewRequest_data() {
+ function test_loadNewWindowRequest_data() {
return [
{ tag: "dialog", viewType: "dialog" },
{ tag: "invalid", viewType: "null" },
@@ -105,7 +105,7 @@ TestWebEngineView {
];
}
- function test_loadNewViewRequest(row) {
+ function test_loadNewWindowRequest(row) {
viewType = row.viewType;
var url = 'data:text/html,%3Chtml%3E%3Cbody%3ETest+Page%3C%2Fbody%3E%3C%2Fhtml%3E';
@@ -118,11 +118,11 @@ TestWebEngineView {
verify(webEngineView.waitForLoadSucceeded());
tryCompare(newViewRequestedSpy, "count", 1);
- compare(newViewRequest.destination, WebEngineNewViewRequest.InNewTab);
+ compare(newViewRequest.destination, WebEngineNewWindowRequest.InNewTab);
verify(!newViewRequest.userInitiated);
if (viewType === "dialog") {
- verify(dialog.webEngineView.waitForLoadSucceeded());
+ tryVerify(dialog.webEngineView.loadSucceeded)
compare(dialog.webEngineView.url, "");
dialog.destroy();
}
@@ -139,11 +139,11 @@ TestWebEngineView {
verify(webEngineView.waitForLoadSucceeded());
tryCompare(newViewRequestedSpy, "count", 1);
- compare(newViewRequest.destination, WebEngineNewViewRequest.InNewDialog);
+ compare(newViewRequest.destination, WebEngineNewWindowRequest.InNewDialog);
compare(newViewRequest.requestedUrl, url);
verify(!newViewRequest.userInitiated);
if (viewType === "dialog") {
- verify(dialog.webEngineView.waitForLoadSucceeded());
+ tryVerify(dialog.webEngineView.loadSucceeded)
dialog.destroy();
}
newViewRequestedSpy.clear();
@@ -163,10 +163,10 @@ TestWebEngineView {
tryCompare(newViewRequestedSpy, "count", 1);
compare(newViewRequest.requestedUrl, url);
- compare(newViewRequest.destination, WebEngineNewViewRequest.InNewDialog);
+ compare(newViewRequest.destination, WebEngineNewWindowRequest.InNewDialog);
verify(newViewRequest.userInitiated);
if (viewType === "dialog") {
- verify(dialog.webEngineView.waitForLoadSucceeded());
+ tryVerify(dialog.webEngineView.loadSucceeded)
dialog.destroy();
}
newViewRequestedSpy.clear();
@@ -180,7 +180,7 @@ TestWebEngineView {
mouseClick(webEngineView, center.x, center.y, Qt.LeftButton, Qt.ControlModifier);
tryCompare(newViewRequestedSpy, "count", 1);
compare(newViewRequest.requestedUrl, Qt.resolvedUrl("test1.html"));
- compare(newViewRequest.destination, WebEngineNewViewRequest.InNewBackgroundTab);
+ compare(newViewRequest.destination, WebEngineNewWindowRequest.InNewBackgroundTab);
verify(newViewRequest.userInitiated);
if (viewType === "" || viewType === "null") {
compare(loadRequestArray[0].status, WebEngineView.LoadStartedStatus);
diff --git a/tests/auto/quick/qmltests/data/tst_notification.qml b/tests/auto/quick/qmltests/data/tst_notification.qml
index 6f66256f..46a21ff4 100644
--- a/tests/auto/quick/qmltests/data/tst_notification.qml
+++ b/tests/auto/quick/qmltests/data/tst_notification.qml
@@ -26,10 +26,10 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtTest 1.0
-import QtWebEngine 1.9
-import Test.Shared 1.0 as Shared
+import QtQuick
+import QtTest
+import QtWebEngine
+import Test.Shared as Shared
TestWebEngineView {
id: view
@@ -48,7 +48,7 @@ TestWebEngineView {
signalName: 'featurePermissionRequested'
}
- onFeaturePermissionRequested: {
+ onFeaturePermissionRequested: function(securityOrigin, feature) {
if (feature === WebEngineView.Notifications) {
view.permissionRequested = true
view.securityOrigin = securityOrigin
diff --git a/tests/auto/quick/qmltests/data/tst_properties.qml b/tests/auto/quick/qmltests/data/tst_properties.qml
index 89f8af9b..7ae21897 100644
--- a/tests/auto/quick/qmltests/data/tst_properties.qml
+++ b/tests/auto/quick/qmltests/data/tst_properties.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
index beeebc04..949e50bb 100644
--- a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
+++ b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_scrollPosition.qml b/tests/auto/quick/qmltests/data/tst_scrollPosition.qml
index 24b352dd..22fa92b8 100644
--- a/tests/auto/quick/qmltests/data/tst_scrollPosition.qml
+++ b/tests/auto/quick/qmltests/data/tst_scrollPosition.qml
@@ -26,10 +26,10 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Window 2.0
-import QtTest 1.0
-import QtWebEngine 1.3
+import QtQuick
+import QtQuick.Window
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_settings.qml b/tests/auto/quick/qmltests/data/tst_settings.qml
index b286a1da..07ce77a0 100644
--- a/tests/auto/quick/qmltests/data/tst_settings.qml
+++ b/tests/auto/quick/qmltests/data/tst_settings.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_titleChanged.qml b/tests/auto/quick/qmltests/data/tst_titleChanged.qml
index 7dda5ce3..d73664b0 100644
--- a/tests/auto/quick/qmltests/data/tst_titleChanged.qml
+++ b/tests/auto/quick/qmltests/data/tst_titleChanged.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml b/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
index 5e163fc6..c84d5da2 100644
--- a/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
+++ b/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
Item {
id: parentItem
@@ -37,8 +37,12 @@ Item {
property var pressEvents: []
property var releaseEvents: []
- Keys.onPressed: pressEvents.push(event.key)
- Keys.onReleased: releaseEvents.push(event.key)
+ Keys.onPressed: function(event) {
+ pressEvents.push(event.key)
+ }
+ Keys.onReleased: function(event) {
+ releaseEvents.push(event.key)
+ }
TestWebEngineView {
id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml
index 4d0bd28b..0f1042f8 100644
--- a/tests/auto/quick/qmltests/data/tst_userScripts.qml
+++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml
@@ -26,9 +26,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
Item {
@@ -77,7 +77,7 @@ Item {
width: 400
height: 300
- onNavigationRequested: {
+ onNavigationRequested: function(request) {
var urlString = request.url.toString();
if (urlString.indexOf("test1.html") !== -1)
userScripts.collection = [ changeDocumentTitleScript() ];
diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml
index 8097758f..d6377cda 100644
--- a/tests/auto/quick/qmltests/data/tst_viewSource.qml
+++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml
@@ -46,7 +46,7 @@ TestWebEngineView {
SignalSpy {
id: newViewRequestedSpy
target: webEngineView
- signalName: "newViewRequested"
+ signalName: "newWindowRequested"
}
SignalSpy {
@@ -55,13 +55,13 @@ TestWebEngineView {
signalName: "titleChanged"
}
- onNewViewRequested: {
+ onNewWindowRequested: function(request) {
viewRequest = {
"destination": request.destination,
"userInitiated": request.userInitiated
};
- webEngineView.acceptAsNewView(request);
+ webEngineView.acceptAsNewWindow(request);
}
TestCase {
@@ -93,7 +93,7 @@ TestWebEngineView {
// The first titleChanged signal is emitted by adoptWebContents()
tryVerify(function() { return titleChangedSpy.count >= 2; });
- compare(viewRequest.destination, WebEngineNewViewRequest.InNewTab);
+ compare(viewRequest.destination, WebEngineNewWindowRequest.InNewTab);
verify(viewRequest.userInitiated);
verify(!webEngineView.action(WebEngineView.ViewSource).enabled);
@@ -122,7 +122,7 @@ TestWebEngineView {
// The first titleChanged signal is emitted by adoptWebContents()
tryVerify(function() { return titleChangedSpy.count >= 2; });
- compare(viewRequest.destination, WebEngineNewViewRequest.InNewTab);
+ compare(viewRequest.destination, WebEngineNewWindowRequest.InNewTab);
verify(viewRequest.userInitiated);
tryCompare(webEngineView, "url", "view-source:" + url.replace("user:passwd@", ""));
diff --git a/tests/auto/quick/qmltests/data/tst_webchannel.qml b/tests/auto/quick/qmltests/data/tst_webchannel.qml
index 3ca3ccce..70edc1bc 100644
--- a/tests/auto/quick/qmltests/data/tst_webchannel.qml
+++ b/tests/auto/quick/qmltests/data/tst_webchannel.qml
@@ -25,11 +25,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebEngine 1.2
+import QtQuick
+import QtTest
+import QtWebEngine
-import QtWebChannel 1.0
+import QtWebChannel
Item {
id: test
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml b/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
index 02b0da1d..48f94df6 100644
--- a/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
@@ -27,7 +27,7 @@
****************************************************************************/
pragma Singleton
-import QtQuick 2.0
+import QtQuick
QtObject {
property var selectedFilesUrl: [];
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml b/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
index 70696803..b24214a2 100644
--- a/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
@@ -26,7 +26,7 @@
**
****************************************************************************/
pragma Singleton
-import QtQml 2.0
+import QtQml
QtObject {
property string dialogMessage: "";
diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro
deleted file mode 100644
index e5d4b26a..00000000
--- a/tests/auto/quick/qmltests/qmltests.pro
+++ /dev/null
@@ -1,134 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/webenginequick/qtwebenginequick-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginequick-private
-
-include(../tests.pri)
-
-QT += qmltest
-DEFINES += QUICK_TEST_SOURCE_DIR=\\\"$$re_escape($$OUT_PWD$${QMAKE_DIR_SEP}webengine.qmltests)\\\"
-IMPORTPATH += $$PWD/data
-
-QML_TESTS = \
- $$PWD/data/tst_action.qml \
- $$PWD/data/tst_activeFocusOnPress.qml \
- $$PWD/data/tst_audioMuted.qml \
- $$PWD/data/tst_contextMenu.qml \
- $$PWD/data/tst_desktopBehaviorLoadHtml.qml \
- $$PWD/data/tst_download.qml \
- $$PWD/data/tst_favicon.qml \
- $$PWD/data/tst_faviconDatabase.qml \
- $$PWD/data/tst_findText.qml \
- $$PWD/data/tst_focusOnNavigation.qml \
- $$PWD/data/tst_fullScreenRequest.qml \
- $$PWD/data/tst_geopermission.qml \
- $$PWD/data/tst_getUserMedia.qml \
- $$PWD/data/tst_inputMethod.qml \
- $$PWD/data/tst_javaScriptDialogs.qml
- $$PWD/data/tst_keyboardEvents.qml \
- $$PWD/data/tst_keyboardModifierMapping.qml \
- $$PWD/data/tst_linkHovered.qml \
- $$PWD/data/tst_loadFail.qml \
- $$PWD/data/tst_loadHtml.qml \
- $$PWD/data/tst_loadProgress.qml \
- $$PWD/data/tst_loadRecursionCrash.qml \
- $$PWD/data/tst_loadUrl.qml \
- $$PWD/data/tst_mouseClick.qml \
- $$PWD/data/tst_mouseMove.qml \
- $$PWD/data/tst_navigationHistory.qml \
- $$PWD/data/tst_navigationRequested.qml \
- $$PWD/data/tst_newViewRequest.qml \
- $$PWD/data/tst_notification.qml \
- $$PWD/data/tst_profile.qml \
- $$PWD/data/tst_properties.qml \
- $$PWD/data/tst_runJavaScript.qml \
- $$PWD/data/tst_scrollPosition.qml \
- $$PWD/data/tst_settings.qml \
- $$PWD/data/tst_titleChanged.qml \
- $$PWD/data/tst_unhandledKeyEventPropagation.qml \
- $$PWD/data/tst_userScripts.qml \
- $$PWD/data/tst_viewSource.qml
-
-qtConfig(webengine-webchannel) {
- QML_TESTS += $$PWD/data/tst_webchannel.qml
-}
-
-qtConfig(ssl) {
- include(../../shared/https.pri)
- QML_TESTS += $$PWD/data/tst_certificateError.qml
-} else {
- include(../../shared/http.pri)
-}
-
-qtHaveModule(quickcontrols) {
- QML_TESTS += \
- $$PWD/data/tst_filePicker.qml
-}
-
-OTHER_FILES += \
- $$PWD/data/TestWebEngineView.qml \
- $$PWD/data/accepttypes.html \
- $$PWD/data/alert.html \
- $$PWD/data/confirm.html \
- $$PWD/data/confirmclose.html \
- $$PWD/data/append-document-title.js \
- $$PWD/data/big-user-script.js \
- $$PWD/data/change-document-title.js \
- $$PWD/data/download.zip \
- $$PWD/data/directoryupload.html \
- $$PWD/data/favicon.html \
- $$PWD/data/favicon2.html \
- $$PWD/data/favicon-candidates-gray.html \
- $$PWD/data/favicon-misc.html \
- $$PWD/data/favicon-multi.html \
- $$PWD/data/favicon-multi-gray.html \
- $$PWD/data/favicon-single.html \
- $$PWD/data/favicon-shortcut.html \
- $$PWD/data/favicon-touch.html \
- $$PWD/data/favicon-unavailable.html \
- $$PWD/data/forms.html \
- $$PWD/data/geolocation.html \
- $$PWD/data/javascript.html \
- $$PWD/data/link.html \
- $$PWD/data/localStorage.html \
- $$PWD/data/multifileupload.html \
- $$PWD/data/redirect.html \
- $$PWD/data/script-with-metadata.js \
- $$PWD/data/singlefileupload.html \
- $$PWD/data/test1.html \
- $$PWD/data/test2.html \
- $$PWD/data/test3.html \
- $$PWD/data/test4.html \
- $$PWD/data/test-iframe.html \
- $$PWD/data/keyboardModifierMapping.html \
- $$PWD/data/keyboardEvents.html \
- $$PWD/data/titleupdate.js \
- $$PWD/data/icons/favicon.png \
- $$PWD/data/icons/gray128.png \
- $$PWD/data/icons/gray16.png \
- $$PWD/data/icons/gray255.png \
- $$PWD/data/icons/gray32.png \
- $$PWD/data/icons/gray64.png \
- $$PWD/data/icons/grayicons.ico \
- $$PWD/data/icons/qt144.png \
- $$PWD/data/icons/qt32.ico \
- $$PWD/data/icons/qtmulti.ico \
- $$PWD/data/icons/small-favicon.png \
- $$PWD/mock-delegates/TestParams/FilePickerParams.qml \
- $$PWD/mock-delegates/TestParams/JSDialogParams.qml \
- $$PWD/mock-delegates/TestParams/qmldir \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/AlertDialog.qml \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/ConfirmDialog.qml \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/FilePicker.qml \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/Menu.qml \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/MenuItem.qml \
- $$PWD/mock-delegates/QtWebEngine/ControlsDelegates/PromptDialog.qml
-
-OTHER_FILES += $$QML_TESTS
-
-!build_pass:!isEmpty(QML_TESTS) {
- for (file, QML_TESTS): QML_TESTS_CONTENT += "$${file}"
- TEST_FILE = $$OUT_PWD/webengine.qmltests
- write_file($$TEST_FILE, QML_TESTS_CONTENT)
-}
-
-load(qt_build_paths)
-
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 78c16710..00c6478e 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWebEngine module of the Qt Toolkit.
@@ -236,7 +236,7 @@ private:
QSpontaneKeyEvent::setSpontaneous(&me);
if (!qApp->notify(window, &me))
- QTest::qWarn("Mouse click event not accepted by receiving window");
+ qWarning("Mouse click event not accepted by receiving window");
}
};
diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro
deleted file mode 100644
index 09297303..00000000
--- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-include(../tests.pri)
-
-exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += core-private webenginequick-private webenginecore-private
-
-HEADERS += ../shared/util.h
diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
index d7515702..7b993d00 100644
--- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
+++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
@@ -63,8 +63,8 @@ void tst_QQuickWebEngineDefaultSurfaceFormat::initEngineAndViewComponent() {
m_engine = new QQmlEngine(this);
QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
m_component.reset(new QQmlComponent(m_engine, this));
- m_component->setData(QByteArrayLiteral("import QtQuick 2.0\n"
- "import QtWebEngine 1.2\n"
+ m_component->setData(QByteArrayLiteral("import QtQuick\n"
+ "import QtWebEngine\n"
"WebEngineView {}")
, QUrl());
}
diff --git a/tests/auto/quick/qquickwebengineview/CMakeLists.txt b/tests/auto/quick/qquickwebengineview/CMakeLists.txt
index 90cbb7a3..b0488048 100644
--- a/tests/auto/quick/qquickwebengineview/CMakeLists.txt
+++ b/tests/auto/quick/qquickwebengineview/CMakeLists.txt
@@ -5,7 +5,6 @@ qt_internal_add_test(tst_qquickwebengineview
tst_qquickwebengineview.cpp
LIBRARIES
Qt::WebEngineCorePrivate
- Qt::WebEngineWidgets
Qt::WebEngineQuick
Qt::GuiPrivate
Qt::WebEngineQuickPrivate
diff --git a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
deleted file mode 100644
index ba373710..00000000
--- a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-include(../tests.pri)
-
-exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += core_private gui-private webenginequick-private webenginecore-private
-
-HEADERS += ../shared/util.h
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index ac339741..347f370f 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -38,10 +38,10 @@
#include <QtQml/QQmlEngine>
#include <QtTest/QtTest>
#include <QtWebEngineQuick/QQuickWebEngineProfile>
-#include <QtWebEngineQuick/QQuickWebEngineScriptCollection>
#include <QtGui/private/qinputmethod_p.h>
-#include <QtWebEngineQuick/private/qquickwebengineview_p.h>
+#include <QtWebEngineQuick/private/qquickwebenginescriptcollection_p.h>
#include <QtWebEngineQuick/private/qquickwebenginesettings_p.h>
+#include <QtWebEngineQuick/private/qquickwebengineview_p.h>
#include <QtWebEngineCore/private/qtwebenginecore-config_p.h>
#include <qpa/qplatforminputcontext.h>
#include <QtTest/private/qemulationdetector_p.h>
@@ -118,8 +118,8 @@ tst_QQuickWebEngineView::tst_QQuickWebEngineView()
static QQmlEngine *engine = new QQmlEngine(this);
m_component.reset(new QQmlComponent(engine, this));
- m_component->setData(QByteArrayLiteral("import QtQuick 2.0\n"
- "import QtWebEngine 1.2\n"
+ m_component->setData(QByteArrayLiteral("import QtQuick\n"
+ "import QtWebEngine\n"
"WebEngineView {}")
, QUrl());
}
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/CMakeLists.txt b/tests/auto/quick/qquickwebengineviewgraphics/CMakeLists.txt
index c7e6bc92..6bc0bc86 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/CMakeLists.txt
+++ b/tests/auto/quick/qquickwebengineviewgraphics/CMakeLists.txt
@@ -4,7 +4,6 @@ qt_internal_add_test(tst_qquickwebengineviewgraphics
tst_qquickwebengineviewgraphics.cpp
LIBRARIES
Qt::CorePrivate
- Qt::WebEngineWidgets
Qt::WebEngineQuickPrivate
Qt::Test
Test::Util
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro b/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro
deleted file mode 100644
index be6296f5..00000000
--- a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-include(../tests.pri)
-CONFIG -= testcase # remove, once this passes in the CI
-exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += webenginequick-private gui-private webenginecore-private
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
index 855b0165..cfd05815 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
+++ b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
@@ -147,7 +147,7 @@ void tst_QQuickWebEngineViewGraphics::reparentToOtherWindow()
void tst_QQuickWebEngineViewGraphics::setHtml(const QString &html)
{
QString htmlData = QUrl::toPercentEncoding(html);
- QString qmlData = QUrl::toPercentEncoding(QStringLiteral("import QtQuick 2.0; import QtWebEngine 1.2; WebEngineView { width: 150; height: 150 }"));
+ QString qmlData = QUrl::toPercentEncoding(QStringLiteral("import QtQuick; import QtWebEngine; WebEngineView { width: 150; height: 150 }"));
m_view->setSource(QUrl(QStringLiteral("data:text/plain,%1").arg(qmlData)));
m_view->create();
diff --git a/tests/auto/quick/qtbug-70248/qtbug-70248.pro b/tests/auto/quick/qtbug-70248/qtbug-70248.pro
deleted file mode 100644
index 7223dcfa..00000000
--- a/tests/auto/quick/qtbug-70248/qtbug-70248.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-include(../tests.pri)
-QT += webenginequick webenginequick-private
-
-RESOURCES += \
- test.qrc
diff --git a/tests/auto/quick/qtbug-70248/test.qml b/tests/auto/quick/qtbug-70248/test.qml
index 35962aff..5870f593 100644
--- a/tests/auto/quick/qtbug-70248/test.qml
+++ b/tests/auto/quick/qtbug-70248/test.qml
@@ -1,6 +1,6 @@
-import QtQuick 2.9
-import QtQuick.Window 2.2
-import QtWebEngine 1.3
+import QtQuick
+import QtQuick.Window
+import QtWebEngine
Window {
visible: true
diff --git a/tests/auto/quick/qtbug-70248/test.qrc b/tests/auto/quick/qtbug-70248/test.qrc
deleted file mode 100644
index 83fea5eb..00000000
--- a/tests/auto/quick/qtbug-70248/test.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>test.qml</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
deleted file mode 100644
index 13e4d78c..00000000
--- a/tests/auto/quick/quick.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/webenginequick/qtwebenginequick-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginequick-private
-
-TEMPLATE = subdirs
-
-SUBDIRS += \
- dialogs \
- inspectorserver \
- qmltests \
- publicapi \
- qquickwebenginedefaultsurfaceformat \
- qquickwebengineviewgraphics \
- qquickwebengineview \
- qtbug-70248
-
-boot2qt: SUBDIRS -= inspectorserver qquickwebengineview qmltests
diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri
deleted file mode 100644
index 8cf4c0af..00000000
--- a/tests/auto/quick/tests.pri
+++ /dev/null
@@ -1,20 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/webenginequick/qtwebenginequick-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginequick-private
-
-TEMPLATE = app
-
-CONFIG += testcase
-
-VPATH += $$_PRO_FILE_PWD_
-TARGET = tst_$$TARGET
-
-SOURCES += $${TARGET}.cpp
-INCLUDEPATH += \
- $$PWD \
- ../shared
-
-QT += testlib network quick webenginequick
-
-# This define is used by some tests to look up resources in the source tree
-DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
-include(../embed_info_plist.pri)
diff --git a/tests/auto/quick/uidelegates/tst_uidelegates.cpp b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
index 95f083f1..4c2fa3b3 100644
--- a/tests/auto/quick/uidelegates/tst_uidelegates.cpp
+++ b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
@@ -143,7 +143,6 @@ void tst_UIDelegates::javaScriptDialog()
void tst_UIDelegates::fileDialog()
{
- QSKIP("There is no FilePicker Control in Quick Controls 2.");
m_window->show();
QTRY_VERIFY(qApp->focusObject());
QQuickWebEngineView *view = webEngineView();
@@ -152,11 +151,10 @@ void tst_UIDelegates::fileDialog()
"<input type='file' id='filePicker'/>"
"</body></html>");
QVERIFY(waitForLoadSucceeded(view));
- QString filePickerStr = QStringLiteral("filePicker");
- QPoint filePickerCenter = elementCenter(view, filePickerStr);
+ QPoint filePickerCenter = elementCenter(view, QStringLiteral("filePicker"));
QTest::mouseClick(view->window(), Qt::LeftButton, {}, filePickerCenter);
- QTRY_VERIFY(view->findChild<QObject *>(filePickerStr));
+ QTRY_VERIFY(view->findChild<QObject *>(QStringLiteral("fileDialog")));
}
void tst_UIDelegates::contextMenu()
@@ -198,7 +196,6 @@ void tst_UIDelegates::tooltip()
void tst_UIDelegates::colorDialog()
{
- QSKIP("There is no ColorPicker Control in Quick Controls 2.");
m_window->show();
QTRY_VERIFY(qApp->focusObject());
QQuickWebEngineView *view = webEngineView();
diff --git a/tests/auto/shared/http.pri b/tests/auto/shared/http.pri
deleted file mode 100644
index 7182bcbb..00000000
--- a/tests/auto/shared/http.pri
+++ /dev/null
@@ -1,4 +0,0 @@
-HEADERS += $$PWD/httpserver.h $$PWD/httpreqrep.h
-SOURCES += $$PWD/httpserver.cpp $$PWD/httpreqrep.cpp
-INCLUDEPATH += $$PWD
-DEFINES += TESTS_SHARED_DATA_DIR=\\\"$$re_escape($$PWD$${QMAKE_DIR_SEP}data)\\\"
diff --git a/tests/auto/shared/https.pri b/tests/auto/shared/https.pri
deleted file mode 100644
index ce4c147f..00000000
--- a/tests/auto/shared/https.pri
+++ /dev/null
@@ -1,4 +0,0 @@
-include($$PWD/http.pri)
-
-HEADERS += $$PWD/httpsserver.h
-RESOURCES += $$PWD/httpsserver.qrc
diff --git a/tests/auto/shared/httpsserver.qrc b/tests/auto/shared/httpsserver.qrc
deleted file mode 100644
index ec57a198..00000000
--- a/tests/auto/shared/httpsserver.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/cert.pem</file>
- <file>resources/key.pem</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/accessibility/CMakeLists.txt b/tests/auto/widgets/accessibility/CMakeLists.txt
index 9653ef1c..bd04bddd 100644
--- a/tests/auto/widgets/accessibility/CMakeLists.txt
+++ b/tests/auto/widgets/accessibility/CMakeLists.txt
@@ -1,6 +1,6 @@
include(../../util/util.cmake)
-qt_internal_add_test(tst_accessibility
+qt_internal_add_test(tst_webengine_accessibility
SOURCES
tst_accessibility.cpp
LIBRARIES
diff --git a/tests/auto/widgets/accessibility/accessibility.pro b/tests/auto/widgets/accessibility/accessibility.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/accessibility/accessibility.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/defaultsurfaceformat/defaultsurfaceformat.pro b/tests/auto/widgets/defaultsurfaceformat/defaultsurfaceformat.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/defaultsurfaceformat/defaultsurfaceformat.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/defaultsurfaceformat/tst_defaultsurfaceformat.qrc b/tests/auto/widgets/defaultsurfaceformat/tst_defaultsurfaceformat.qrc
deleted file mode 100644
index 3d5f1b3b..00000000
--- a/tests/auto/widgets/defaultsurfaceformat/tst_defaultsurfaceformat.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/index.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/favicon/favicon.pro b/tests/auto/widgets/favicon/favicon.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/favicon/favicon.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/favicon/tst_favicon.qrc b/tests/auto/widgets/favicon/tst_favicon.qrc
deleted file mode 100644
index a352f8a8..00000000
--- a/tests/auto/widgets/favicon/tst_favicon.qrc
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/favicon-misc.html</file>
- <file>resources/favicon-multi.html</file>
- <file>resources/favicon-shortcut.html</file>
- <file>resources/favicon-single.html</file>
- <file>resources/favicon-touch.html</file>
- <file>resources/favicon-unavailable.html</file>
- <file>resources/icons/qt144.png</file>
- <file>resources/icons/qt32.ico</file>
- <file>resources/icons/qtmulti.ico</file>
- <file>resources/test1.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/loadsignals/loadsignals.pro b/tests/auto/widgets/loadsignals/loadsignals.pro
deleted file mode 100644
index 9c239f1a..00000000
--- a/tests/auto/widgets/loadsignals/loadsignals.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
diff --git a/tests/auto/widgets/loadsignals/tst_loadsignals.qrc b/tests/auto/widgets/loadsignals/tst_loadsignals.qrc
deleted file mode 100644
index b4ee3667..00000000
--- a/tests/auto/widgets/loadsignals/tst_loadsignals.qrc
+++ /dev/null
@@ -1,13 +0,0 @@
-<RCC>
- <qresource prefix="/resources">
- <file alias="page1.html">../../shared/data/loadprogress/page1.html</file>
- <file alias="page2.html">../../shared/data/loadprogress/page2.html</file>
- <file alias="page3.html">../../shared/data/loadprogress/page3.html</file>
- <file alias="page4.html">../../shared/data/loadprogress/page4.html</file>
- <file alias="page5.html">../../shared/data/loadprogress/page5.html</file>
- <file alias="page6.html">../../shared/data/loadprogress/page6.html</file>
- <file alias="page7.html">../../shared/data/loadprogress/page7.html</file>
- <file alias="page8.html">../../shared/data/loadprogress/page8.html</file>
- <file alias="downloadable.tar.gz">../../shared/data/loadprogress/downloadable.tar.gz</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/widgets/offscreen/offscreen.pro b/tests/auto/widgets/offscreen/offscreen.pro
deleted file mode 100644
index 2469f9a5..00000000
--- a/tests/auto/widgets/offscreen/offscreen.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-include(../tests.pri)
-QT += webenginewidgets
-qpa.name = QT_QPA_PLATFORM
-qpa.value = offscreen
-QT_TOOL_ENV += qpa
-
diff --git a/tests/auto/widgets/offscreen/tst_offscreen.qrc b/tests/auto/widgets/offscreen/tst_offscreen.qrc
deleted file mode 100644
index 8a998fe8..00000000
--- a/tests/auto/widgets/offscreen/tst_offscreen.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>test.html</file>
-</qresource>
-</RCC>
-
diff --git a/tests/auto/widgets/printing/printing.pro b/tests/auto/widgets/printing/printing.pro
deleted file mode 100644
index 92f5d611..00000000
--- a/tests/auto/widgets/printing/printing.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginecore-private
-
-include(../tests.pri)
-QT *= core-private webenginecore-private
-
-qtConfig(webengine-poppler-cpp) {
- CONFIG += link_pkgconfig
- PKGCONFIG += poppler-cpp
-}
diff --git a/tests/auto/widgets/printing/tst_printing.cpp b/tests/auto/widgets/printing/tst_printing.cpp
index 3f1344ed..0559fb78 100644
--- a/tests/auto/widgets/printing/tst_printing.cpp
+++ b/tests/auto/widgets/printing/tst_printing.cpp
@@ -58,10 +58,10 @@ void tst_Printing::printToPdfBasic()
view.load(QUrl("qrc:///resources/basic_printing_page.html"));
QTRY_VERIFY(spy.count() == 1);
- QSignalSpy savePdfSpy(&view, &QWebEngineView::pdfPrintingFinished);
+ QSignalSpy savePdfSpy(view.page(), &QWebEnginePage::pdfPrintingFinished);
QPageLayout layout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(0.0, 0.0, 0.0, 0.0));
QString path = tempDir.path() + "/print_1_success.pdf";
- view.printToPdf(path, layout);
+ view.page()->printToPdf(path, layout);
QTRY_VERIFY2(savePdfSpy.count() == 1, "Printing to PDF file failed without signal");
QList<QVariant> successArguments = savePdfSpy.takeFirst();
@@ -73,7 +73,7 @@ void tst_Printing::printToPdfBasic()
#else
path = tempDir.path() + "/print_|2_failed.pdf";
#endif
- view.printToPdf(path, QPageLayout());
+ view.page()->printToPdf(path, QPageLayout());
QTRY_VERIFY2(savePdfSpy.count() == 1, "Printing to PDF file failed without signal");
QList<QVariant> failedArguments = savePdfSpy.takeFirst();
@@ -81,11 +81,11 @@ void tst_Printing::printToPdfBasic()
QVERIFY2(failedArguments.at(1).toBool() == false, "Printing to PDF file succeeded though it should fail");
CallbackSpy<QByteArray> successfulSpy;
- view.printToPdf(successfulSpy.ref(), layout);
+ view.page()->printToPdf(successfulSpy.ref(), layout);
QVERIFY(successfulSpy.waitForResult().length() > 0);
CallbackSpy<QByteArray> failedInvalidLayoutSpy;
- view.printToPdf(failedInvalidLayoutSpy.ref(), QPageLayout());
+ view.page()->printToPdf(failedInvalidLayoutSpy.ref(), QPageLayout());
QCOMPARE(failedInvalidLayoutSpy.waitForResult().length(), 0);
}
@@ -95,6 +95,7 @@ void tst_Printing::printRequest()
QPageLayout layout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(0.0, 0.0, 0.0, 0.0));
QSignalSpy loadFinishedSpy(&view, &QWebEngineView::loadFinished);
QSignalSpy printRequestedSpy(&view, &QWebEngineView::printRequested);
+ QSignalSpy printRequestedSpy2(view.page(), &QWebEnginePage::printRequested);
QSignalSpy savePdfSpy(&view, &QWebEngineView::pdfPrintingFinished);
CallbackSpy<QByteArray> resultSpy;
@@ -102,6 +103,7 @@ void tst_Printing::printRequest()
QTRY_VERIFY(loadFinishedSpy.count() == 1);
view.page()->runJavaScript("window.print()");
QTRY_VERIFY(printRequestedSpy.count() == 1);
+ QVERIFY(printRequestedSpy2.count() == 1);
//check if printing still works
view.printToPdf(resultSpy.ref(), layout);
const QByteArray data = resultSpy.waitForResult();
diff --git a/tests/auto/widgets/printing/tst_printing.qrc b/tests/auto/widgets/printing/tst_printing.qrc
deleted file mode 100644
index b1795ef8..00000000
--- a/tests/auto/widgets/printing/tst_printing.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/basic_printing_page.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/proxy/CMakeLists.txt b/tests/auto/widgets/proxy/CMakeLists.txt
index 0929c050..03af3c35 100644
--- a/tests/auto/widgets/proxy/CMakeLists.txt
+++ b/tests/auto/widgets/proxy/CMakeLists.txt
@@ -1,6 +1,6 @@
include(../../httpserver/httpserver.cmake)
-qt_internal_add_test(tst_proxy
+qt_internal_add_test(tst_webengine_proxy
SOURCES
tst_proxy.cpp
LIBRARIES
diff --git a/tests/auto/widgets/proxy/proxy.pro b/tests/auto/widgets/proxy/proxy.pro
deleted file mode 100644
index ce4ccbfc..00000000
--- a/tests/auto/widgets/proxy/proxy.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-include(../tests.pri)
-QT += core-private webenginewidgets webenginewidgets-private
-
-HEADERS += \
- proxy_server.h
-
-SOURCES += \
- proxy_server.cpp
-
diff --git a/tests/auto/widgets/proxypac/proxypac.pri b/tests/auto/widgets/proxypac/proxypac.pri
deleted file mode 100644
index f9f23da6..00000000
--- a/tests/auto/widgets/proxypac/proxypac.pri
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = app
-CONFIG += testcase
-QT += testlib network webenginewidgets webenginecore
-HEADERS += $$PWD/proxyserver.h
-SOURCES += $$PWD/proxyserver.cpp $$PWD/tst_proxypac.cpp
diff --git a/tests/auto/widgets/proxypac/proxypac.pro b/tests/auto/widgets/proxypac/proxypac.pro
deleted file mode 100644
index f2a43d41..00000000
--- a/tests/auto/widgets/proxypac/proxypac.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = proxypac_file proxypac_qrc
-CONFIG += ordered
-
diff --git a/tests/auto/widgets/proxypac/proxypac.qrc b/tests/auto/widgets/proxypac/proxypac.qrc
deleted file mode 100644
index 9047585a..00000000
--- a/tests/auto/widgets/proxypac/proxypac.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
-<qresource profix="/">
- <file>proxy.pac</file>
-</qresource>
-</RCC>
-
diff --git a/tests/auto/widgets/proxypac/proxypac_file/proxypac_file.pro b/tests/auto/widgets/proxypac/proxypac_file/proxypac_file.pro
deleted file mode 100644
index 03712305..00000000
--- a/tests/auto/widgets/proxypac/proxypac_file/proxypac_file.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-include(../proxypac.pri)
-
-proxy_pac.name = QTWEBENGINE_CHROMIUM_FLAGS
-win32:proxy_pac.value = --proxy-pac-url="file:///$$PWD/../proxy.pac"
-else:proxy_pac.value = --proxy-pac-url="file://$$PWD/../proxy.pac"
-boot2qt:proxy_pac.value = "--single-process --no-sandbox --proxy-pac-url=file://$$PWD/../proxy.pac"
-
-QT_TOOL_ENV += proxy_pac
-
diff --git a/tests/auto/widgets/proxypac/proxypac_qrc/proxypac_qrc.pro b/tests/auto/widgets/proxypac/proxypac_qrc/proxypac_qrc.pro
deleted file mode 100644
index a5ab6460..00000000
--- a/tests/auto/widgets/proxypac/proxypac_qrc/proxypac_qrc.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-include(../proxypac.pri)
-
-proxy_pac.name = QTWEBENGINE_CHROMIUM_FLAGS
-proxy_pac.value = --proxy-pac-url="qrc:///proxy.pac"
-boot2qt:proxy_pac.value = "--single-process --no-sandbox --proxy-pac-url=qrc:///proxy.pac"
-QT_TOOL_ENV += proxy_pac
-RESOURCES+= $$PWD/../proxypac.qrc
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/qwebenginedownloadrequest.pro b/tests/auto/widgets/qwebenginedownloadrequest/qwebenginedownloadrequest.pro
deleted file mode 100644
index 18a66c46..00000000
--- a/tests/auto/widgets/qwebenginedownloadrequest/qwebenginedownloadrequest.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
-QT *= core-private
diff --git a/tests/auto/widgets/qwebenginehistory/qwebenginehistory.pro b/tests/auto/widgets/qwebenginehistory/qwebenginehistory.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/qwebenginehistory/qwebenginehistory.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.qrc b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.qrc
deleted file mode 100644
index cdfe575a..00000000
--- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/page1.html</file>
- <file>resources/page2.html</file>
- <file>resources/page3.html</file>
- <file>resources/page4.html</file>
- <file>resources/page5.html</file>
- <file>resources/page6.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro
deleted file mode 100644
index 18a66c46..00000000
--- a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
-QT *= core-private
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index c118bd71..8a44af3f 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -233,6 +233,8 @@ private Q_SLOTS:
void editActionsWithoutSelection();
void customUserAgentInNewTab();
+ void openNewTabInDifferentProfile_data();
+ void openNewTabInDifferentProfile();
void renderProcessCrashed();
void renderProcessPid();
void backgroundColor();
@@ -4572,6 +4574,28 @@ void tst_QWebEnginePage::editActionsWithoutSelection()
QVERIFY(page->action(QWebEnginePage::Unselect)->isEnabled());
}
+struct PageWithNewWindowHandler : QWebEnginePage
+{
+ QScopedPointer<PageWithNewWindowHandler> newPage;
+ bool handleInSignal;
+ QWebEngineProfile *targetProfile = nullptr;
+ QSignalSpy loadSpy { this, &QWebEnginePage::loadFinished };
+ PageWithNewWindowHandler(QWebEngineProfile *p, bool inSignal = false, QWebEngineProfile *tp = nullptr)
+ : QWebEnginePage(p), handleInSignal(inSignal), targetProfile(tp) {
+ if (handleInSignal)
+ connect(this, &QWebEnginePage::newWindowRequested, this, [this] (QWebEngineNewWindowRequest &r) {
+ newPage.reset(new PageWithNewWindowHandler(targetProfile ? targetProfile : profile(), handleInSignal));
+ newPage->acceptAsNewWindow(r);
+ });
+ }
+ QWebEnginePage *createWindow(WebWindowType) override {
+ if (handleInSignal)
+ return nullptr;
+ newPage.reset(new PageWithNewWindowHandler(targetProfile ? targetProfile : profile(), handleInSignal));
+ return newPage.get();
+ }
+};
+
void tst_QWebEnginePage::customUserAgentInNewTab()
{
HttpServer server;
@@ -4584,55 +4608,84 @@ void tst_QWebEnginePage::customUserAgentInNewTab()
});
QVERIFY(server.start());
- class Page : public QWebEnginePage {
- public:
- QWebEngineProfile *targetProfile = nullptr;
- QScopedPointer<QWebEnginePage> newPage;
- Page(QWebEngineProfile *profile) : QWebEnginePage(profile) {}
- private:
- QWebEnginePage *createWindow(WebWindowType) override
- {
- newPage.reset(new QWebEnginePage(targetProfile ? targetProfile : profile(), nullptr));
- return newPage.data();
- }
- };
- QWebEngineProfile profile1, profile2;
- profile1.setHttpUserAgent(QStringLiteral("custom 1"));
- profile2.setHttpUserAgent(QStringLiteral("custom 2"));
- Page page(&profile1);
- QWebEngineView view;
- view.resize(500, 500);
- view.setPage(&page);
- view.show();
+ QString expectedUserAgent("custom 1");
+ QWebEngineProfile profile;
+ profile.setHttpUserAgent(expectedUserAgent);
+
+ PageWithNewWindowHandler page(&profile);
+ QWebEngineView view; view.resize(500, 500); view.setPage(&page); view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- QSignalSpy spy(&page, &QWebEnginePage::loadFinished);
// First check we can get the user-agent passed through normally
page.setHtml(QString("<html><body><a id='link' target='_blank' href='") +
server.url("/test1").toEncoded() +
QString("'>link</a></body></html>"));
- QTRY_COMPARE(spy.count(), 1);
- QVERIFY(spy.takeFirst().value(0).toBool());
- QCOMPARE(evaluateJavaScriptSync(&page, QStringLiteral("navigator.userAgent")).toString(), profile1.httpUserAgent());
+ QTRY_COMPARE(page.loadSpy.count(), 1);
+ QVERIFY(page.loadSpy.takeFirst().value(0).toBool());
+ QCOMPARE(evaluateJavaScriptSync(&page, QStringLiteral("navigator.userAgent")).toString(), expectedUserAgent);
QTest::mouseClick(view.focusProxy(), Qt::LeftButton, {}, elementCenter(&page, "link"));
QTRY_VERIFY(page.newPage);
+ QTRY_COMPARE(page.newPage->loadSpy.count(), 1);
QTRY_VERIFY(!lastUserAgent.isEmpty());
- QCOMPARE(lastUserAgent, profile1.httpUserAgent().toUtf8());
+ QCOMPARE(lastUserAgent, expectedUserAgent);
+ QCOMPARE(evaluateJavaScriptSync(page.newPage.get(), QStringLiteral("navigator.userAgent")).toString(), expectedUserAgent);
// Now check we can get the new user-agent of the profile
page.newPage.reset();
- page.targetProfile = &profile2;
- spy.clear();
+ expectedUserAgent = "custom 2";
+ profile.setHttpUserAgent(expectedUserAgent);
+ page.loadSpy.clear();
lastUserAgent = { };
page.setHtml(QString("<html><body><a id='link' target='_blank' href='") +
server.url("/test2").toEncoded() +
QString("'>link</a></body></html>"));
- QTRY_COMPARE(spy.count(), 1);
- QVERIFY(spy.takeFirst().value(0).toBool());
+ QTRY_COMPARE(page.loadSpy.count(), 1);
+ QVERIFY(page.loadSpy.takeFirst().value(0).toBool());
QTest::mouseClick(view.focusProxy(), Qt::LeftButton, {}, elementCenter(&page, "link"));
QTRY_VERIFY(page.newPage);
+ QTRY_COMPARE(page.newPage->loadSpy.count(), 1);
QTRY_VERIFY(!lastUserAgent.isEmpty());
- QCOMPARE(lastUserAgent, profile2.httpUserAgent().toUtf8());
+ QCOMPARE(lastUserAgent, expectedUserAgent);
+ QCOMPARE(evaluateJavaScriptSync(&page, QStringLiteral("navigator.userAgent")).toString(), expectedUserAgent);
+ QCOMPARE(evaluateJavaScriptSync(page.newPage.get(), QStringLiteral("navigator.userAgent")).toString(), expectedUserAgent);
+}
+
+void tst_QWebEnginePage::openNewTabInDifferentProfile_data()
+{
+ QTest::addColumn<bool>("handleInSignal");
+ QTest::addRow("handleInSignal") << true;
+ QTest::addRow("handleInOverride") << false;
+}
+
+void tst_QWebEnginePage::openNewTabInDifferentProfile()
+{
+ QFETCH(bool, handleInSignal);
+
+ HttpServer server;
+ QStringList receivedRequests;
+ connect(&server, &HttpServer::newRequest, [&] (HttpReqRep *r) {
+ receivedRequests.append(r->requestPath());
+ r->setResponseBody("DUMMY");
+ r->sendResponse();
+ });
+ QVERIFY(server.start());
+
+ QWebEngineProfile profile1, profile2;
+ PageWithNewWindowHandler page(&profile1, handleInSignal, &profile2);
+ QWebEngineView view; view.setPage(&page); view.resize(320, 240); view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ page.setHtml(QString("<html><body><a id='link' target='_blank' href='%1'>link</a></body></html>").arg(server.url("/first.html").toEncoded()));
+ QTRY_COMPARE(page.loadSpy.count(), 1);
+ QVERIFY(page.loadSpy.takeFirst().value(0).toBool());
+
+ QTest::mouseClick(view.focusProxy(), Qt::LeftButton, {}, elementCenter(&page, "link"));
+ QTRY_VERIFY(page.newPage);
+ QVERIFY(page.profile() == &profile1);
+ QVERIFY(page.newPage->profile() == &profile2);
+ // not load should occur or requests to server issued since web_contents is not expected to be adopted from other profile
+ QTRY_LOOP_IMPL(page.newPage->loadSpy.size() != 0, 1000, 100);
+ QVERIFY2(receivedRequests.isEmpty(), qPrintable(receivedRequests.join(", ")));
}
void tst_QWebEnginePage::renderProcessCrashed()
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc
deleted file mode 100644
index 3480341e..00000000
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/content.html</file>
- <file>resources/dynamicFrame.html</file>
- <file>resources/index.html</file>
- <file>resources/frame_a.html</file>
- <file>resources/frame_c.html</file>
- <file>resources/iframe.html</file>
- <file>resources/iframe2.html</file>
- <file>resources/iframe3.html</file>
- <file>resources/framedindex.html</file>
- <file>resources/fullscreen.html</file>
- <file>resources/script.html</file>
- <file>resources/user.css</file>
- <file>resources/image.png</file>
- <file>resources/pasteimage.html</file>
- <file>resources/redirect.html</file>
- <file>resources/reload.html</file>
- <file>resources/style.css</file>
- <file>resources/test1.html</file>
- <file>resources/test2.html</file>
- <file>resources/testiframe.html</file>
- <file>resources/testiframe2.html</file>
- <file>resources/foo.txt</file>
- <file>resources/bar.txt</file>
- <file>resources/path with spaces.txt</file>
- <file>resources/lifecycle.html</file>
-</qresource>
-<qresource prefix='/shared'>
- <file alias='notification.html'>../../shared/data/notification.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/qwebengineprofile/qwebengineprofile.pro b/tests/auto/widgets/qwebengineprofile/qwebengineprofile.pro
deleted file mode 100644
index ca16cee3..00000000
--- a/tests/auto/widgets/qwebengineprofile/qwebengineprofile.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-include(../tests.pri)
-include(../../shared/http.pri)
-exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT *= core-private gui-private
diff --git a/tests/auto/widgets/qwebenginescript/qwebenginescript.pro b/tests/auto/widgets/qwebenginescript/qwebenginescript.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/qwebenginescript/qwebenginescript.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
index ca2f0cab..5df9f035 100644
--- a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
+++ b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
@@ -70,6 +70,7 @@ private Q_SLOTS:
void webChannelWithExistingQtObject();
void navigation();
void webChannelWithBadString();
+ void webChannelWithJavaScriptDisabled();
#endif
void noTransportWithoutWebChannel();
void scriptsInNestedIframes();
@@ -592,6 +593,36 @@ void tst_QWebEngineScript::webChannelWithBadString()
QChar data(0xd800);
QCOMPARE(host.text(), data);
}
+
+void tst_QWebEngineScript::webChannelWithJavaScriptDisabled()
+{
+ QWebEnginePage page;
+ QSignalSpy spyFinished(&page, &QWebEnginePage::loadFinished);
+ // JavaScript disabled in main world
+ page.settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, false);
+
+ TestObject testObject;
+ QScopedPointer<QWebChannel> channel(new QWebChannel(this));
+ channel->registerObject(QStringLiteral("object"), &testObject);
+ page.setWebChannel(channel.data(), QWebEngineScript::ApplicationWorld);
+
+ QWebEngineScript script = webChannelScript();
+ script.setWorldId(QWebEngineScript::ApplicationWorld);
+ page.scripts().insert(script);
+
+ page.setHtml(QStringLiteral("<html><body></body></html>"));
+ QVERIFY(spyFinished.wait());
+
+ QSignalSpy spyTextChanged(&testObject, &TestObject::textChanged);
+ page.runJavaScript(QLatin1String(
+ "new QWebChannel(qt.webChannelTransport,"
+ " function(channel) {"
+ " channel.objects.object.text = 'test';"
+ " }"
+ ");"), QWebEngineScript::ApplicationWorld);
+ QVERIFY(spyTextChanged.wait());
+ QCOMPARE(testObject.text(), QStringLiteral("test"));
+}
#endif
void tst_QWebEngineScript::matchQrcUrl()
diff --git a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.qrc b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.qrc
deleted file mode 100644
index 3290cb58..00000000
--- a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.qrc
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>resources/test_iframe_main.html</file>
- <file>resources/test_iframe_outer.html</file>
- <file>resources/test_iframe_inner.html</file>
- <file>resources/test_window_open.html</file>
- <file>resources/title_a.html</file>
- <file>resources/title_b.html</file>
- <file>resources/webChannelWithBadString.html</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/widgets/qwebengineview/qwebengineview.pro b/tests/auto/widgets/qwebengineview/qwebengineview.pro
deleted file mode 100644
index d91c0074..00000000
--- a/tests/auto/widgets/qwebengineview/qwebengineview.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-QT *= gui-private
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index 73a41e6f..d6a945e6 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -301,6 +301,8 @@ void tst_QWebEngineView::changePage()
}
view->setPage(pageFrom.get());
+ QCOMPARE(view->page(), pageFrom.get());
+ QCOMPARE(QWebEngineView::forPage(pageFrom.get()), view.get());
QTRY_COMPARE(spyUrl.count(), 1);
QCOMPARE(spyUrl.last().value(0).toUrl(), pageFrom->url());
@@ -328,6 +330,9 @@ void tst_QWebEngineView::changePage()
}
view->setPage(pageTo.get());
+ QCOMPARE(view->page(), pageTo.get());
+ QCOMPARE(QWebEngineView::forPage(pageTo.get()), view.get());
+ QCOMPARE(QWebEngineView::forPage(pageFrom.get()), nullptr);
QTRY_COMPARE(spyUrl.count(), 2);
QCOMPARE(spyUrl.last().value(0).toUrl(), pageTo->url());
@@ -486,8 +491,8 @@ void tst_QWebEngineView::microFocusCoordinates()
void tst_QWebEngineView::focusInputTypes()
{
- const QPlatformInputContext *context = QGuiApplicationPrivate::platformIntegration()->inputContext();
- bool imeHasHiddenTextCapability = context && context->hasCapability(QPlatformInputContext::HiddenTextCapability);
+ const QPlatformInputContext *platformInputContext = QGuiApplicationPrivate::platformIntegration()->inputContext();
+ bool imeHasHiddenTextCapability = platformInputContext && platformInputContext->hasCapability(QPlatformInputContext::HiddenTextCapability);
QWebEngineView webView;
webView.resize(640, 480);
@@ -518,7 +523,8 @@ void tst_QWebEngineView::focusInputTypes()
QTRY_COMPARE(evaluateJavaScriptSync(webView.page(), "document.activeElement.id").toString(), QStringLiteral("passwordInput"));
VERIFY_INPUTMETHOD_HINTS(webView.focusProxy()->inputMethodHints(), (Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase | Qt::ImhHiddenText));
QVERIFY(!webView.focusProxy()->testAttribute(Qt::WA_InputMethodEnabled));
- QTRY_COMPARE(inputMethodQuery(Qt::ImEnabled).toBool(), imeHasHiddenTextCapability);
+ QTRY_VERIFY(inputMethodQuery(Qt::ImEnabled).toBool());
+ QTRY_COMPARE(platformInputContext->inputMethodAccepted(), imeHasHiddenTextCapability);
// 'tel' field
QPoint telInputCenter = elementCenter(webView.page(), "telInput");
@@ -557,7 +563,8 @@ void tst_QWebEngineView::focusInputTypes()
QTRY_COMPARE(evaluateJavaScriptSync(webView.page(), "document.activeElement.id").toString(), QStringLiteral("passwordInput"));
VERIFY_INPUTMETHOD_HINTS(webView.focusProxy()->inputMethodHints(), (Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase | Qt::ImhHiddenText));
QVERIFY(!webView.focusProxy()->testAttribute(Qt::WA_InputMethodEnabled));
- QTRY_COMPARE(inputMethodQuery(Qt::ImEnabled).toBool(), imeHasHiddenTextCapability);
+ QTRY_VERIFY(inputMethodQuery(Qt::ImEnabled).toBool());
+ QTRY_COMPARE(platformInputContext->inputMethodAccepted(), imeHasHiddenTextCapability);
// 'text' type
QTest::mouseClick(webView.focusProxy(), Qt::LeftButton, {}, textInputCenter);
@@ -571,7 +578,8 @@ void tst_QWebEngineView::focusInputTypes()
QTRY_COMPARE(evaluateJavaScriptSync(webView.page(), "document.activeElement.id").toString(), QStringLiteral("passwordInput"));
VERIFY_INPUTMETHOD_HINTS(webView.focusProxy()->inputMethodHints(), (Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase | Qt::ImhHiddenText));
QVERIFY(!webView.focusProxy()->testAttribute(Qt::WA_InputMethodEnabled));
- QTRY_COMPARE(inputMethodQuery(Qt::ImEnabled).toBool(), imeHasHiddenTextCapability);
+ QTRY_VERIFY(inputMethodQuery(Qt::ImEnabled).toBool());
+ QTRY_COMPARE(platformInputContext->inputMethodAccepted(), imeHasHiddenTextCapability);
// 'text area' field
QPoint textAreaCenter = elementCenter(webView.page(), "textArea");
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc b/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc
deleted file mode 100644
index a0e81e24..00000000
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc
+++ /dev/null
@@ -1,11 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>resources/index.html</file>
- <file>resources/frame_a.html</file>
- <file>resources/input_types.html</file>
- <file>resources/scrolltest_page.html</file>
- <file>resources/keyboardEvents.html</file>
- <file>resources/image2.png</file>
- <file>resources/dummy.html</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/widgets/schemes/schemes.pro b/tests/auto/widgets/schemes/schemes.pro
deleted file mode 100644
index e56bbe8f..00000000
--- a/tests/auto/widgets/schemes/schemes.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../tests.pri)
-exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT *= core-private gui-private
diff --git a/tests/auto/widgets/shutdown/shutdown.pro b/tests/auto/widgets/shutdown/shutdown.pro
deleted file mode 100644
index e99c7f49..00000000
--- a/tests/auto/widgets/shutdown/shutdown.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../tests.pri)
diff --git a/tests/auto/widgets/spellchecking/CMakeLists.txt b/tests/auto/widgets/spellchecking/CMakeLists.txt
index afed7e28..8e1a165c 100644
--- a/tests/auto/widgets/spellchecking/CMakeLists.txt
+++ b/tests/auto/widgets/spellchecking/CMakeLists.txt
@@ -31,7 +31,9 @@ foreach(dictFile ${dicts})
add_custom_command(TARGET tst_spellchecking
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${spellcheckerDir}
- COMMAND $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qwebengine_convert_dict>
+ COMMAND ${CMAKE_COMMAND} -E env
+ $<IF:$<BOOL:${WEBENGINE_MODULE_BUILD}>,QT_WEBENGINE_ICU_DATA_DIR=${CMAKE_CURRENT_BINARY_DIR}/../../../../resources,CMAKE=AWESOME>
+ $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qwebengine_convert_dict>
${CMAKE_CURRENT_SOURCE_DIR}/dict/${dictFile}
${spellcheckerDir}/${dictName}.bdic
COMMENT "Running qwebengine_convert_dict"
diff --git a/tests/auto/widgets/spellchecking/spellchecking.pro b/tests/auto/widgets/spellchecking/spellchecking.pro
deleted file mode 100644
index a36c82e2..00000000
--- a/tests/auto/widgets/spellchecking/spellchecking.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-include(../tests.pri)
-
-DISTFILES += \
- dict/en-US.dic \
- dict/en-US.aff \
- dict/de-DE.dic \
- dict/de-DE.aff \
-
-qtPrepareTool(CONVERT_TOOL, qwebengine_convert_dict)
-
-debug_and_release {
- CONFIG(debug, debug|release): DICTIONARIES_DIR = debug/qtwebengine_dictionaries
- else: DICTIONARIES_DIR = release/qtwebengine_dictionaries
-} else {
- DICTIONARIES_DIR = qtwebengine_dictionaries
-}
-
-dict.files = $$PWD/dict/en-US.dic $$PWD/dict/de-DE.dic
-dictoolbuild.input = dict.files
-dictoolbuild.output = $${DICTIONARIES_DIR}/${QMAKE_FILE_BASE}.bdic
-dictoolbuild.commands = $${CONVERT_TOOL} ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
-dictoolbuild.name = Build ${QMAKE_FILE_IN_BASE}
-dictoolbuild.CONFIG = no_link target_predeps
-QMAKE_EXTRA_COMPILERS += dictoolbuild
diff --git a/tests/auto/widgets/spellchecking/tst_spellchecking.qrc b/tests/auto/widgets/spellchecking/tst_spellchecking.qrc
deleted file mode 100644
index 505b932c..00000000
--- a/tests/auto/widgets/spellchecking/tst_spellchecking.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>resources/index.html</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri
deleted file mode 100644
index e69820ff..00000000
--- a/tests/auto/widgets/tests.pri
+++ /dev/null
@@ -1,21 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginecore-private
-
-TEMPLATE = app
-
-CONFIG += testcase
-
-VPATH += $$_PRO_FILE_PWD_
-TARGET = tst_$$TARGET
-
-SOURCES += $${TARGET}.cpp
-INCLUDEPATH += $$PWD
-
-exists($$_PRO_FILE_PWD_/$${TARGET}.qrc): RESOURCES += $${TARGET}.qrc
-
-QT += testlib network webenginewidgets widgets quick quickwidgets
-
-# This define is used by some tests to look up resources in the source tree
-DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
-
-include(../embed_info_plist.pri)
diff --git a/tests/auto/widgets/touchinput/touchinput.pro b/tests/auto/widgets/touchinput/touchinput.pro
deleted file mode 100644
index d91c0074..00000000
--- a/tests/auto/widgets/touchinput/touchinput.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-include(../tests.pri)
-QT *= gui-private
diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
deleted file mode 100644
index b793ce69..00000000
--- a/tests/auto/widgets/widgets.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginecore webenginecore-private
-
-TEMPLATE = subdirs
-
-SUBDIRS += \
- defaultsurfaceformat \
- faviconmanager \
- loadsignals \
- offscreen \
- proxy \
- proxypac \
- schemes \
- shutdown \
- qwebenginedownloadrequest \
- qwebenginepage \
- qwebenginehistory \
- qwebengineprofile \
- qwebenginescript \
- qwebengineview
-
-# Synthetic touch events are not supported on macOS
-!macos: SUBDIRS += touchinput
-
-qtConfig(accessibility) {
- SUBDIRS += accessibility
-}
-
-qtConfig(webengine-printing-and-pdf) {
- SUBDIRS += printing
-}
-
-qtConfig(webengine-spellchecker):!cross_compile {
- !qtConfig(webengine-native-spellchecker) {
- SUBDIRS += spellchecking
- } else {
- message("Spellcheck test will not be built because it depends on usage of Hunspell dictionaries.")
- }
-}
-
-# QTBUG-60268
-boot2qt: SUBDIRS -= accessibility defaultsurfaceformat devtools \
- qwebenginepage \
- qwebengineprofile \
- qwebengineview
-
-darwin|win32: SUBDIRS -= offscreen
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 2c497236..128674f0 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -362,7 +362,7 @@ ApplicationWindow {
}
}
- onNewViewRequested: {
+ onNewWindowRequested: {
if (!request.userInitiated)
print("Warning: Blocked a popup window.")
else if (request.destination == WebEngineView.NewViewInTab) {
diff --git a/tests/quicktestbrowser/resources.qrc b/tests/quicktestbrowser/resources.qrc
index 63ff051d..8fbe286f 100644
--- a/tests/quicktestbrowser/resources.qrc
+++ b/tests/quicktestbrowser/resources.qrc
@@ -11,9 +11,9 @@
</qresource>
<qresource prefix="icons">
<!-- To the risk of this breaking more often, do not duplicate the resources since this application won't be deployed -->
- <file alias="go-next.png">../../examples/webengine/quicknanobrowser/icons/3rdparty/go-next.png</file>
- <file alias="go-previous.png">../../examples/webengine/quicknanobrowser/icons/3rdparty/go-previous.png</file>
- <file alias="process-stop.png">../../examples/webengine/quicknanobrowser/icons/3rdparty/process-stop.png</file>
- <file alias="view-refresh.png">../../examples/webengine/quicknanobrowser/icons/3rdparty/view-refresh.png</file>
+ <file alias="go-next.png">../../examples/webenginequick/quicknanobrowser/icons/3rdparty/go-next.png</file>
+ <file alias="go-previous.png">../../examples/webenginequick/quicknanobrowser/icons/3rdparty/go-previous.png</file>
+ <file alias="process-stop.png">../../examples/webenginequick/quicknanobrowser/icons/3rdparty/process-stop.png</file>
+ <file alias="view-refresh.png">../../examples/webenginequick/quicknanobrowser/icons/3rdparty/view-refresh.png</file>
</qresource>
</RCC>
diff --git a/tests/tests.pro b/tests/tests.pro
deleted file mode 100644
index cb7d7879..00000000
--- a/tests/tests.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += auto
-
-qtHaveModule(webengine-quick) {
- SUBDIRS += quicktestbrowser
-}