summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-14 16:11:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-16 16:42:22 +0000
commit551b83b280bf83137e0c8ceefad59558bfe9e03e (patch)
treea3133e21416d599db2a635c9bbfec9b560516de7 /tests/auto
parent5f4fb14cb0f6b443885e79516f450853e44f650d (diff)
Stop using Widgets in WebEngineCore tests
With QWebEnginePage in Core we can now make the core tests core-only. Add the same times moves tests from widgets that only uses core classes. Change-Id: I67a25b534912d9a0891e16b0419f0db9bf434e92 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit b8c48ee53009365a39d9dde1f6773048ec5ee4a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/core/CMakeLists.txt6
-rw-r--r--tests/auto/core/certificateerror/CMakeLists.txt (renamed from tests/auto/widgets/certificateerror/CMakeLists.txt)2
-rw-r--r--tests/auto/core/certificateerror/certificateerror.pro (renamed from tests/auto/widgets/certificateerror/certificateerror.pro)0
-rw-r--r--tests/auto/core/certificateerror/resources/server.key (renamed from tests/auto/widgets/certificateerror/resources/server.key)0
-rw-r--r--tests/auto/core/certificateerror/resources/server.pem (renamed from tests/auto/widgets/certificateerror/resources/server.pem)0
-rw-r--r--tests/auto/core/certificateerror/tst_certificateerror.cpp (renamed from tests/auto/widgets/certificateerror/tst_certificateerror.cpp)0
-rw-r--r--tests/auto/core/core.pro7
-rw-r--r--tests/auto/core/devtools/CMakeLists.txt (renamed from tests/auto/widgets/devtools/CMakeLists.txt)2
-rw-r--r--tests/auto/core/devtools/devtools.pro (renamed from tests/auto/widgets/devtools/devtools.pro)0
-rw-r--r--tests/auto/core/devtools/tst_devtools.cpp (renamed from tests/auto/widgets/devtools/tst_devtools.cpp)0
-rw-r--r--tests/auto/core/origins/CMakeLists.txt (renamed from tests/auto/widgets/origins/CMakeLists.txt)2
-rw-r--r--tests/auto/core/origins/origins.pro (renamed from tests/auto/widgets/origins/origins.pro)0
-rw-r--r--tests/auto/core/origins/resources/createObjectURL.html (renamed from tests/auto/widgets/origins/resources/createObjectURL.html)0
-rw-r--r--tests/auto/core/origins/resources/dedicatedWorker.html (renamed from tests/auto/widgets/origins/resources/dedicatedWorker.html)0
-rw-r--r--tests/auto/core/origins/resources/dedicatedWorker.js (renamed from tests/auto/widgets/origins/resources/dedicatedWorker.js)0
-rw-r--r--tests/auto/core/origins/resources/mixedSchemes.html (renamed from tests/auto/widgets/origins/resources/mixedSchemes.html)0
-rw-r--r--tests/auto/core/origins/resources/mixedSchemesWithCsp.html (renamed from tests/auto/widgets/origins/resources/mixedSchemesWithCsp.html)0
-rw-r--r--tests/auto/core/origins/resources/mixedSchemes_frame.html (renamed from tests/auto/widgets/origins/resources/mixedSchemes_frame.html)0
-rw-r--r--tests/auto/core/origins/resources/mixedXHR.html (renamed from tests/auto/widgets/origins/resources/mixedXHR.html)0
-rw-r--r--tests/auto/core/origins/resources/mixedXHR.txt (renamed from tests/auto/widgets/origins/resources/mixedXHR.txt)0
-rw-r--r--tests/auto/core/origins/resources/redirect.css (renamed from tests/auto/widgets/origins/resources/redirect.css)0
-rw-r--r--tests/auto/core/origins/resources/redirect.html (renamed from tests/auto/widgets/origins/resources/redirect.html)0
-rw-r--r--tests/auto/core/origins/resources/serviceWorker.html (renamed from tests/auto/widgets/origins/resources/serviceWorker.html)0
-rw-r--r--tests/auto/core/origins/resources/serviceWorker.js (renamed from tests/auto/widgets/origins/resources/serviceWorker.js)0
-rw-r--r--tests/auto/core/origins/resources/sharedWorker.html (renamed from tests/auto/widgets/origins/resources/sharedWorker.html)0
-rw-r--r--tests/auto/core/origins/resources/sharedWorker.js (renamed from tests/auto/widgets/origins/resources/sharedWorker.js)0
-rw-r--r--tests/auto/core/origins/resources/subdir/frame2.html (renamed from tests/auto/widgets/origins/resources/subdir/frame2.html)0
-rw-r--r--tests/auto/core/origins/resources/subdir/index.html (renamed from tests/auto/widgets/origins/resources/subdir/index.html)0
-rw-r--r--tests/auto/core/origins/resources/subdir_frame1.html (renamed from tests/auto/widgets/origins/resources/subdir_frame1.html)0
-rw-r--r--tests/auto/core/origins/resources/viewSource.html (renamed from tests/auto/widgets/origins/resources/viewSource.html)0
-rw-r--r--tests/auto/core/origins/resources/websocket.html (renamed from tests/auto/widgets/origins/resources/websocket.html)0
-rw-r--r--tests/auto/core/origins/tst_origins.cpp (renamed from tests/auto/widgets/origins/tst_origins.cpp)0
-rw-r--r--tests/auto/core/origins/tst_origins.qrc (renamed from tests/auto/widgets/origins/tst_origins.qrc)0
-rw-r--r--tests/auto/core/qwebenginecookiestore/CMakeLists.txt2
-rw-r--r--tests/auto/core/qwebenginesettings/BLACKLIST (renamed from tests/auto/widgets/qwebenginesettings/BLACKLIST)0
-rw-r--r--tests/auto/core/qwebenginesettings/CMakeLists.txt (renamed from tests/auto/widgets/qwebenginesettings/CMakeLists.txt)2
-rw-r--r--tests/auto/core/qwebenginesettings/qwebenginesettings.pro (renamed from tests/auto/widgets/qwebenginesettings/qwebenginesettings.pro)0
-rw-r--r--tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp (renamed from tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp)2
-rw-r--r--tests/auto/core/qwebengineurlrequestinterceptor/CMakeLists.txt2
-rw-r--r--tests/auto/core/tests.pri2
-rw-r--r--tests/auto/util/util.h24
-rw-r--r--tests/auto/util/widgetutil.h51
-rw-r--r--tests/auto/widgets/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/accessibility/tst_accessibility.cpp2
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp2
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp12
-rw-r--r--tests/auto/widgets/widgets.pro7
47 files changed, 78 insertions, 55 deletions
diff --git a/tests/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt
index ee2f010d0..0d2340188 100644
--- a/tests/auto/core/CMakeLists.txt
+++ b/tests/auto/core/CMakeLists.txt
@@ -1,5 +1,11 @@
add_subdirectory(qwebenginecookiestore)
+add_subdirectory(qwebenginesettings)
add_subdirectory(qwebengineurlrequestinterceptor)
+add_subdirectory(origins)
+if(NOT boot2qt)
+ add_subdirectory(devtools)
+endif()
if(QT_FEATURE_ssl)
add_subdirectory(qwebengineclientcertificatestore)
+ add_subdirectory(certificateerror)
endif()
diff --git a/tests/auto/widgets/certificateerror/CMakeLists.txt b/tests/auto/core/certificateerror/CMakeLists.txt
index c2210457c..57801e195 100644
--- a/tests/auto/widgets/certificateerror/CMakeLists.txt
+++ b/tests/auto/core/certificateerror/CMakeLists.txt
@@ -5,7 +5,7 @@ qt_internal_add_test(tst_certificateerror
SOURCES
tst_certificateerror.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
Test::HttpServer
Test::Util
)
diff --git a/tests/auto/widgets/certificateerror/certificateerror.pro b/tests/auto/core/certificateerror/certificateerror.pro
index 73ba7515b..73ba7515b 100644
--- a/tests/auto/widgets/certificateerror/certificateerror.pro
+++ b/tests/auto/core/certificateerror/certificateerror.pro
diff --git a/tests/auto/widgets/certificateerror/resources/server.key b/tests/auto/core/certificateerror/resources/server.key
index 9bf87aee3..9bf87aee3 100644
--- a/tests/auto/widgets/certificateerror/resources/server.key
+++ b/tests/auto/core/certificateerror/resources/server.key
diff --git a/tests/auto/widgets/certificateerror/resources/server.pem b/tests/auto/core/certificateerror/resources/server.pem
index a201ed08e..a201ed08e 100644
--- a/tests/auto/widgets/certificateerror/resources/server.pem
+++ b/tests/auto/core/certificateerror/resources/server.pem
diff --git a/tests/auto/widgets/certificateerror/tst_certificateerror.cpp b/tests/auto/core/certificateerror/tst_certificateerror.cpp
index 74c7e3bd4..74c7e3bd4 100644
--- a/tests/auto/widgets/certificateerror/tst_certificateerror.cpp
+++ b/tests/auto/core/certificateerror/tst_certificateerror.cpp
diff --git a/tests/auto/core/core.pro b/tests/auto/core/core.pro
index 1dc5e052c..23b25bd97 100644
--- a/tests/auto/core/core.pro
+++ b/tests/auto/core/core.pro
@@ -3,7 +3,10 @@ QT_FOR_CONFIG += network-private
SUBDIRS += \
qwebenginecookiestore \
- qwebengineurlrequestinterceptor
+ qwebenginesettings \
+ qwebengineurlrequestinterceptor \
+ devtools \
+ origins
-qtConfig(ssl): SUBDIRS += qwebengineclientcertificatestore
+qtConfig(ssl): SUBDIRS += certificateerror qwebengineclientcertificatestore
diff --git a/tests/auto/widgets/devtools/CMakeLists.txt b/tests/auto/core/devtools/CMakeLists.txt
index 2ef09df12..fd8d850f0 100644
--- a/tests/auto/widgets/devtools/CMakeLists.txt
+++ b/tests/auto/core/devtools/CMakeLists.txt
@@ -2,6 +2,6 @@ qt_internal_add_test(tst_devtools
SOURCES
tst_devtools.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
)
diff --git a/tests/auto/widgets/devtools/devtools.pro b/tests/auto/core/devtools/devtools.pro
index e99c7f493..e99c7f493 100644
--- a/tests/auto/widgets/devtools/devtools.pro
+++ b/tests/auto/core/devtools/devtools.pro
diff --git a/tests/auto/widgets/devtools/tst_devtools.cpp b/tests/auto/core/devtools/tst_devtools.cpp
index 3026b3931..3026b3931 100644
--- a/tests/auto/widgets/devtools/tst_devtools.cpp
+++ b/tests/auto/core/devtools/tst_devtools.cpp
diff --git a/tests/auto/widgets/origins/CMakeLists.txt b/tests/auto/core/origins/CMakeLists.txt
index ca7a6a249..a044ea2ef 100644
--- a/tests/auto/widgets/origins/CMakeLists.txt
+++ b/tests/auto/core/origins/CMakeLists.txt
@@ -5,7 +5,7 @@ qt_internal_add_test(tst_origins
SOURCES
tst_origins.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
Test::HttpServer
Test::Util
)
diff --git a/tests/auto/widgets/origins/origins.pro b/tests/auto/core/origins/origins.pro
index 6cf0b2b92..6cf0b2b92 100644
--- a/tests/auto/widgets/origins/origins.pro
+++ b/tests/auto/core/origins/origins.pro
diff --git a/tests/auto/widgets/origins/resources/createObjectURL.html b/tests/auto/core/origins/resources/createObjectURL.html
index 133f636bb..133f636bb 100644
--- a/tests/auto/widgets/origins/resources/createObjectURL.html
+++ b/tests/auto/core/origins/resources/createObjectURL.html
diff --git a/tests/auto/widgets/origins/resources/dedicatedWorker.html b/tests/auto/core/origins/resources/dedicatedWorker.html
index cb4f14e73..cb4f14e73 100644
--- a/tests/auto/widgets/origins/resources/dedicatedWorker.html
+++ b/tests/auto/core/origins/resources/dedicatedWorker.html
diff --git a/tests/auto/widgets/origins/resources/dedicatedWorker.js b/tests/auto/core/origins/resources/dedicatedWorker.js
index 2631939d7..2631939d7 100644
--- a/tests/auto/widgets/origins/resources/dedicatedWorker.js
+++ b/tests/auto/core/origins/resources/dedicatedWorker.js
diff --git a/tests/auto/widgets/origins/resources/mixedSchemes.html b/tests/auto/core/origins/resources/mixedSchemes.html
index c73e9ecdc..c73e9ecdc 100644
--- a/tests/auto/widgets/origins/resources/mixedSchemes.html
+++ b/tests/auto/core/origins/resources/mixedSchemes.html
diff --git a/tests/auto/widgets/origins/resources/mixedSchemesWithCsp.html b/tests/auto/core/origins/resources/mixedSchemesWithCsp.html
index ad7cbeeb7..ad7cbeeb7 100644
--- a/tests/auto/widgets/origins/resources/mixedSchemesWithCsp.html
+++ b/tests/auto/core/origins/resources/mixedSchemesWithCsp.html
diff --git a/tests/auto/widgets/origins/resources/mixedSchemes_frame.html b/tests/auto/core/origins/resources/mixedSchemes_frame.html
index 00c20ba37..00c20ba37 100644
--- a/tests/auto/widgets/origins/resources/mixedSchemes_frame.html
+++ b/tests/auto/core/origins/resources/mixedSchemes_frame.html
diff --git a/tests/auto/widgets/origins/resources/mixedXHR.html b/tests/auto/core/origins/resources/mixedXHR.html
index 3dfd90006..3dfd90006 100644
--- a/tests/auto/widgets/origins/resources/mixedXHR.html
+++ b/tests/auto/core/origins/resources/mixedXHR.html
diff --git a/tests/auto/widgets/origins/resources/mixedXHR.txt b/tests/auto/core/origins/resources/mixedXHR.txt
index b5754e203..b5754e203 100644
--- a/tests/auto/widgets/origins/resources/mixedXHR.txt
+++ b/tests/auto/core/origins/resources/mixedXHR.txt
diff --git a/tests/auto/widgets/origins/resources/redirect.css b/tests/auto/core/origins/resources/redirect.css
index 41d7560cc..41d7560cc 100644
--- a/tests/auto/widgets/origins/resources/redirect.css
+++ b/tests/auto/core/origins/resources/redirect.css
diff --git a/tests/auto/widgets/origins/resources/redirect.html b/tests/auto/core/origins/resources/redirect.html
index 04948e14b..04948e14b 100644
--- a/tests/auto/widgets/origins/resources/redirect.html
+++ b/tests/auto/core/origins/resources/redirect.html
diff --git a/tests/auto/widgets/origins/resources/serviceWorker.html b/tests/auto/core/origins/resources/serviceWorker.html
index 27890c98f..27890c98f 100644
--- a/tests/auto/widgets/origins/resources/serviceWorker.html
+++ b/tests/auto/core/origins/resources/serviceWorker.html
diff --git a/tests/auto/widgets/origins/resources/serviceWorker.js b/tests/auto/core/origins/resources/serviceWorker.js
index 40a8c178f..40a8c178f 100644
--- a/tests/auto/widgets/origins/resources/serviceWorker.js
+++ b/tests/auto/core/origins/resources/serviceWorker.js
diff --git a/tests/auto/widgets/origins/resources/sharedWorker.html b/tests/auto/core/origins/resources/sharedWorker.html
index 8b5a0a794..8b5a0a794 100644
--- a/tests/auto/widgets/origins/resources/sharedWorker.html
+++ b/tests/auto/core/origins/resources/sharedWorker.html
diff --git a/tests/auto/widgets/origins/resources/sharedWorker.js b/tests/auto/core/origins/resources/sharedWorker.js
index 60ef93a5f..60ef93a5f 100644
--- a/tests/auto/widgets/origins/resources/sharedWorker.js
+++ b/tests/auto/core/origins/resources/sharedWorker.js
diff --git a/tests/auto/widgets/origins/resources/subdir/frame2.html b/tests/auto/core/origins/resources/subdir/frame2.html
index 3a2f664ca..3a2f664ca 100644
--- a/tests/auto/widgets/origins/resources/subdir/frame2.html
+++ b/tests/auto/core/origins/resources/subdir/frame2.html
diff --git a/tests/auto/widgets/origins/resources/subdir/index.html b/tests/auto/core/origins/resources/subdir/index.html
index 9c5d5d782..9c5d5d782 100644
--- a/tests/auto/widgets/origins/resources/subdir/index.html
+++ b/tests/auto/core/origins/resources/subdir/index.html
diff --git a/tests/auto/widgets/origins/resources/subdir_frame1.html b/tests/auto/core/origins/resources/subdir_frame1.html
index 63973f2f4..63973f2f4 100644
--- a/tests/auto/widgets/origins/resources/subdir_frame1.html
+++ b/tests/auto/core/origins/resources/subdir_frame1.html
diff --git a/tests/auto/widgets/origins/resources/viewSource.html b/tests/auto/core/origins/resources/viewSource.html
index 977074c74..977074c74 100644
--- a/tests/auto/widgets/origins/resources/viewSource.html
+++ b/tests/auto/core/origins/resources/viewSource.html
diff --git a/tests/auto/widgets/origins/resources/websocket.html b/tests/auto/core/origins/resources/websocket.html
index 31db66571..31db66571 100644
--- a/tests/auto/widgets/origins/resources/websocket.html
+++ b/tests/auto/core/origins/resources/websocket.html
diff --git a/tests/auto/widgets/origins/tst_origins.cpp b/tests/auto/core/origins/tst_origins.cpp
index a34404a7e..a34404a7e 100644
--- a/tests/auto/widgets/origins/tst_origins.cpp
+++ b/tests/auto/core/origins/tst_origins.cpp
diff --git a/tests/auto/widgets/origins/tst_origins.qrc b/tests/auto/core/origins/tst_origins.qrc
index fcf54aaea..fcf54aaea 100644
--- a/tests/auto/widgets/origins/tst_origins.qrc
+++ b/tests/auto/core/origins/tst_origins.qrc
diff --git a/tests/auto/core/qwebenginecookiestore/CMakeLists.txt b/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
index 6125b4f12..33ba5ff1a 100644
--- a/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
+++ b/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
@@ -5,7 +5,7 @@ qt_internal_add_test(tst_qwebenginecookiestore
SOURCES
tst_qwebenginecookiestore.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
Test::HttpServer
Test::Util
)
diff --git a/tests/auto/widgets/qwebenginesettings/BLACKLIST b/tests/auto/core/qwebenginesettings/BLACKLIST
index d4a35a76a..d4a35a76a 100644
--- a/tests/auto/widgets/qwebenginesettings/BLACKLIST
+++ b/tests/auto/core/qwebenginesettings/BLACKLIST
diff --git a/tests/auto/widgets/qwebenginesettings/CMakeLists.txt b/tests/auto/core/qwebenginesettings/CMakeLists.txt
index f5ec3441e..7f8b49d1b 100644
--- a/tests/auto/widgets/qwebenginesettings/CMakeLists.txt
+++ b/tests/auto/core/qwebenginesettings/CMakeLists.txt
@@ -4,6 +4,6 @@ qt_internal_add_test(tst_qwebenginesettings
SOURCES
tst_qwebenginesettings.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
Test::Util
)
diff --git a/tests/auto/widgets/qwebenginesettings/qwebenginesettings.pro b/tests/auto/core/qwebenginesettings/qwebenginesettings.pro
index 70786e70f..70786e70f 100644
--- a/tests/auto/widgets/qwebenginesettings/qwebenginesettings.pro
+++ b/tests/auto/core/qwebenginesettings/qwebenginesettings.pro
diff --git a/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp b/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp
index c1772461f..4220f496b 100644
--- a/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp
+++ b/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp
@@ -147,7 +147,7 @@ void tst_QWebEngineSettings::javascriptClipboard()
QCOMPARE(evaluateJavaScriptSync(&page, "document.queryCommandEnabled('copy')").toBool(),
copyResult);
QCOMPARE(evaluateJavaScriptSync(&page, "document.execCommand('copy')").toBool(), copyResult);
- QTRY_COMPARE(QApplication::clipboard()->text(),
+ QTRY_COMPARE(QGuiApplication::clipboard()->text(),
(copyResult ? QString("OriginalText") : QString()));
diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/CMakeLists.txt b/tests/auto/core/qwebengineurlrequestinterceptor/CMakeLists.txt
index 96a06c1b9..0f8d90a08 100644
--- a/tests/auto/core/qwebengineurlrequestinterceptor/CMakeLists.txt
+++ b/tests/auto/core/qwebengineurlrequestinterceptor/CMakeLists.txt
@@ -5,7 +5,7 @@ qt_internal_add_test(tst_qwebengineurlrequestinterceptor
SOURCES
tst_qwebengineurlrequestinterceptor.cpp
LIBRARIES
- Qt::WebEngineWidgets
+ Qt::WebEngineCore
Test::HttpServer
Test::Util
)
diff --git a/tests/auto/core/tests.pri b/tests/auto/core/tests.pri
index 59d6c0865..2f34f1735 100644
--- a/tests/auto/core/tests.pri
+++ b/tests/auto/core/tests.pri
@@ -10,7 +10,7 @@ INCLUDEPATH += $$PWD
exists($$_PRO_FILE_PWD_/$${TARGET}.qrc): RESOURCES += $${TARGET}.qrc
-QT += testlib network webenginewidgets widgets
+QT += testlib network webenginecore
# This define is used by some tests to look up resources in the source tree
DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/util/util.h b/tests/auto/util/util.h
index 537b9212b..cc5f5e8b4 100644
--- a/tests/auto/util/util.h
+++ b/tests/auto/util/util.h
@@ -36,7 +36,6 @@
#include <QSignalSpy>
#include <QTimer>
#include <qwebenginepage.h>
-#include <qwebengineview.h>
// Disconnect signal on destruction.
class ScopedConnection
@@ -175,11 +174,6 @@ static inline bool loadSync(QWebEnginePage *page, const QUrl &url, bool ok = tru
return (!spy.empty() || spy.wait(20000)) && (spy.front().value(0).toBool() == ok);
}
-static inline bool loadSync(QWebEngineView *view, const QUrl &url, bool ok = true)
-{
- return loadSync(view->page(), url, ok);
-}
-
static inline QPoint elementCenter(QWebEnginePage *page, const QString &id)
{
const QString jsCode(
@@ -218,21 +212,3 @@ static inline QRect elementGeometry(QWebEnginePage *page, const QString &id)
#define W_QSKIP(a, b) QSKIP(a)
-
-#define W_QTEST_MAIN(TestObject, params) \
-int main(int argc, char *argv[]) \
-{ \
- QList<const char *> w_argv(argc); \
- for (int i = 0; i < argc; ++i) \
- w_argv[i] = argv[i]; \
- for (int i = 0; i < params.size(); ++i) \
- w_argv.append(params[i].data()); \
- int w_argc = w_argv.size(); \
- \
- QApplication app(w_argc, const_cast<char **>(w_argv.data())); \
- app.setAttribute(Qt::AA_Use96Dpi, true); \
- QTEST_DISABLE_KEYPAD_NAVIGATION \
- TestObject tc; \
- QTEST_SET_MAIN_SOURCE_PATH \
- return QTest::qExec(&tc, argc, argv); \
-}
diff --git a/tests/auto/util/widgetutil.h b/tests/auto/util/widgetutil.h
new file mode 100644
index 000000000..b72b56030
--- /dev/null
+++ b/tests/auto/util/widgetutil.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Functions and macros that really need to be in QTestLib
+
+#include "util.h"
+
+#include <QApplication>
+
+#define W_QTEST_MAIN(TestObject, params) \
+int main(int argc, char *argv[]) \
+{ \
+ QList<const char *> w_argv(argc); \
+ for (int i = 0; i < argc; ++i) \
+ w_argv[i] = argv[i]; \
+ for (int i = 0; i < params.size(); ++i) \
+ w_argv.append(params[i].data()); \
+ int w_argc = w_argv.size(); \
+ \
+ QApplication app(w_argc, const_cast<char **>(w_argv.data())); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
+ QTEST_DISABLE_KEYPAD_NAVIGATION \
+ TestObject tc; \
+ QTEST_SET_MAIN_SOURCE_PATH \
+ return QTest::qExec(&tc, argc, argv); \
+}
diff --git a/tests/auto/widgets/CMakeLists.txt b/tests/auto/widgets/CMakeLists.txt
index a6e8d7c35..f3e3edc90 100644
--- a/tests/auto/widgets/CMakeLists.txt
+++ b/tests/auto/widgets/CMakeLists.txt
@@ -1,13 +1,11 @@
if(NOT boot2qt)
add_subdirectory(defaultsurfaceformat)
- add_subdirectory(devtools)
add_subdirectory(qwebenginepage)
add_subdirectory(qwebengineprofile)
add_subdirectory(qwebengineview)
endif()
add_subdirectory(favicon)
add_subdirectory(loadsignals)
-add_subdirectory(origins)
add_subdirectory(proxy)
add_subdirectory(proxypac)
add_subdirectory(schemes)
@@ -15,7 +13,6 @@ add_subdirectory(shutdown)
add_subdirectory(qwebenginedownloadrequest)
add_subdirectory(qwebenginehistory)
add_subdirectory(qwebenginescript)
-add_subdirectory(qwebenginesettings)
if(LINUX)
add_subdirectory(offscreen)
endif()
@@ -28,9 +25,6 @@ endif()
if(QT_FEATURE_webengine_printing_and_pdf)
add_subdirectory(printing)
endif()
-if(QT_FEATURE_ssl)
- add_subdirectory(certificateerror)
-endif()
if(QT_FEATURE_webengine_spellchecker AND NOT CMAKE_CROSSCOMPILING AND NOT QT_FEATURE_webengine_native_spellchecker)
add_subdirectory(spellchecking)
endif()
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 429a40f4d..430a70e85 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -18,7 +18,7 @@
*/
#include <qtest.h>
-#include <util.h>
+#include <widgetutil.h>
#include <QHBoxLayout>
#include <QMainWindow>
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 8aabf927e..797aef335 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <util.h>
+#include <widgetutil.h>
#include <QtWebEngineCore/qtwebenginecore-config.h>
#include <QByteArray>
#include <QClipboard>
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index a91108946..fb0425893 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -391,37 +391,37 @@ void tst_QWebEngineProfile::urlSchemeHandlers()
view.setPage(new QWebEnginePage(&profile, &view));
view.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
QString emailAddress = QStringLiteral("egon@olsen-banden.dk");
- QVERIFY(loadSync(&view, QUrl(QStringLiteral("letterto:") + emailAddress)));
+ QVERIFY(loadSync(view.page(), QUrl(QStringLiteral("letterto:") + emailAddress)));
QCOMPARE(toPlainTextSync(view.page()), emailAddress);
// Install a gopher handler after the view has been fully initialized.
ReplyingUrlSchemeHandler gopherHandler;
profile.installUrlSchemeHandler("gopher", &gopherHandler);
QUrl url = QUrl(QStringLiteral("gopher://olsen-banden.dk/benny"));
- QVERIFY(loadSync(&view, url));
+ QVERIFY(loadSync(view.page(), url));
QCOMPARE(toPlainTextSync(view.page()), url.toString());
// Remove the letterto scheme, and check whether it is not handled anymore.
profile.removeUrlScheme("letterto");
emailAddress = QStringLiteral("kjeld@olsen-banden.dk");
- QVERIFY(loadSync(&view, QUrl(QStringLiteral("letterto:") + emailAddress), false));
+ QVERIFY(loadSync(view.page(), QUrl(QStringLiteral("letterto:") + emailAddress), false));
QVERIFY(toPlainTextSync(view.page()) != emailAddress);
// Check if gopher is still working after removing letterto.
url = QUrl(QStringLiteral("gopher://olsen-banden.dk/yvonne"));
- QVERIFY(loadSync(&view, url));
+ QVERIFY(loadSync(view.page(), url));
QCOMPARE(toPlainTextSync(view.page()), url.toString());
// Does removeAll work?
profile.removeAllUrlSchemeHandlers();
url = QUrl(QStringLiteral("gopher://olsen-banden.dk/harry"));
- QVERIFY(loadSync(&view, url, false));
+ QVERIFY(loadSync(view.page(), url, false));
QVERIFY(toPlainTextSync(view.page()) != url.toString());
// Install a handler that is owned by the view. Make sure this doesn't crash on shutdown.
profile.installUrlSchemeHandler("aviancarrier", new ReplyingUrlSchemeHandler(&view));
url = QUrl(QStringLiteral("aviancarrier:inspector.mortensen@politistyrke.dk"));
- QVERIFY(loadSync(&view, url));
+ QVERIFY(loadSync(view.page(), url));
QCOMPARE(toPlainTextSync(view.page()), url.toString());
// Check that all buffers got deleted
diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
index 4ec9e5d63..b793ce69e 100644
--- a/tests/auto/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets.pro
@@ -5,11 +5,9 @@ TEMPLATE = subdirs
SUBDIRS += \
defaultsurfaceformat \
- devtools \
faviconmanager \
loadsignals \
offscreen \
- origins \
proxy \
proxypac \
schemes \
@@ -19,7 +17,6 @@ SUBDIRS += \
qwebenginehistory \
qwebengineprofile \
qwebenginescript \
- qwebenginesettings \
qwebengineview
# Synthetic touch events are not supported on macOS
@@ -33,10 +30,6 @@ qtConfig(webengine-printing-and-pdf) {
SUBDIRS += printing
}
-qtConfig(ssl) {
- SUBDIRS += certificateerror
-}
-
qtConfig(webengine-spellchecker):!cross_compile {
!qtConfig(webengine-native-spellchecker) {
SUBDIRS += spellchecking