summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/certificateerror/WebView.qml64
-rw-r--r--tests/auto/quick/certificateerror/certificateerror.pro7
-rw-r--r--tests/auto/quick/certificateerror/certificateerror.qrc5
-rw-r--r--tests/auto/quick/certificateerror/testhandler.cpp63
-rw-r--r--tests/auto/quick/certificateerror/testhandler.h59
-rw-r--r--tests/auto/quick/certificateerror/tst_certificateerror.cpp125
-rw-r--r--tests/auto/quick/dialogs/tst_dialogs.cpp4
-rw-r--r--tests/auto/quick/inspectorserver/tst_inspectorserver.cpp11
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp344
-rw-r--r--tests/auto/quick/qmltests/data/accepttypes.html (renamed from tests/auto/quick/qmltests2/data/accepttypes.html)0
-rw-r--r--tests/auto/quick/qmltests/data/alert.html (renamed from tests/auto/quick/qmltests2/data/alert.html)0
-rw-r--r--tests/auto/quick/qmltests/data/confirm.html (renamed from tests/auto/quick/qmltests2/data/confirm.html)0
-rw-r--r--tests/auto/quick/qmltests/data/confirmclose.html (renamed from tests/auto/quick/qmltests2/data/confirmclose.html)0
-rw-r--r--tests/auto/quick/qmltests/data/directoryupload.html (renamed from tests/auto/quick/qmltests2/data/directoryupload.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-candidates-gray.html (renamed from tests/auto/quick/qmltests2/data/favicon-candidates-gray.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-misc.html (renamed from tests/auto/quick/qmltests2/data/favicon-misc.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-multi-gray.html (renamed from tests/auto/quick/qmltests2/data/favicon-multi-gray.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-multi.html (renamed from tests/auto/quick/qmltests2/data/favicon-multi.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-shortcut.html (renamed from tests/auto/quick/qmltests2/data/favicon-shortcut.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-single.html (renamed from tests/auto/quick/qmltests2/data/favicon-single.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-touch.html (renamed from tests/auto/quick/qmltests2/data/favicon-touch.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon-unavailable.html (renamed from tests/auto/quick/qmltests2/data/favicon-unavailable.html)0
-rw-r--r--tests/auto/quick/qmltests/data/favicon2.html (renamed from tests/auto/quick/qmltests2/data/favicon2.html)0
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray128.png (renamed from tests/auto/quick/qmltests2/data/icons/gray128.png)bin146 -> 146 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray16.png (renamed from tests/auto/quick/qmltests2/data/icons/gray16.png)bin72 -> 72 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray255.png (renamed from tests/auto/quick/qmltests2/data/icons/gray255.png)bin335 -> 335 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray32.png (renamed from tests/auto/quick/qmltests2/data/icons/gray32.png)bin79 -> 79 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray64.png (renamed from tests/auto/quick/qmltests2/data/icons/gray64.png)bin99 -> 99 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/grayicons.ico (renamed from tests/auto/quick/qmltests2/data/icons/grayicons.ico)bin22150 -> 22150 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/qt144.png (renamed from tests/auto/quick/qmltests2/data/icons/qt144.png)bin8315 -> 8315 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/qt32.ico (renamed from tests/auto/quick/qmltests2/data/icons/qt32.ico)bin4286 -> 4286 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/qtmulti.ico (renamed from tests/auto/quick/qmltests2/data/icons/qtmulti.ico)bin22382 -> 22382 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/small-favicon.png (renamed from tests/auto/quick/qmltests2/data/icons/small-favicon.png)bin878 -> 878 bytes
-rw-r--r--tests/auto/quick/qmltests/data/multifileupload.html (renamed from tests/auto/quick/qmltests2/data/multifileupload.html)0
-rw-r--r--tests/auto/quick/qmltests/data/prompt.html (renamed from tests/auto/quick/qmltests2/data/prompt.html)0
-rw-r--r--tests/auto/quick/qmltests/data/singlefileupload.html (renamed from tests/auto/quick/qmltests2/data/singlefileupload.html)0
-rw-r--r--tests/auto/quick/qmltests/data/titleupdate.js (renamed from tests/auto/quick/qmltests2/data/titleupdate.js)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_certificateError.qml (renamed from tests/auto/quick/qmltests_ssl/data/tst_certificateError.qml)4
-rw-r--r--tests/auto/quick/qmltests/data/tst_download.qml42
-rw-r--r--tests/auto/quick/qmltests/data/tst_favicon.qml (renamed from tests/auto/quick/qmltests2/data/tst_favicon.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_faviconDownload.qml (renamed from tests/auto/quick/qmltests2/data/tst_faviconDownload.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_filePicker.qml (renamed from tests/auto/quick/qmltests2/data/tst_filePicker.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_inputMethod.qml (renamed from tests/auto/quick/qmltests2/data/tst_inputMethod.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml (renamed from tests/auto/quick/qmltests2/data/tst_javaScriptDialogs.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_linkHovered.qml (renamed from tests/auto/quick/qmltests2/data/tst_linkHovered.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadFail.qml (renamed from tests/auto/quick/qmltests2/data/tst_loadFail.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_mouseClick.qml (renamed from tests/auto/quick/qmltests2/data/tst_mouseClick.qml)0
-rw-r--r--tests/auto/quick/qmltests/data/tst_userScripts.qml85
-rw-r--r--tests/auto/quick/qmltests/data/tst_viewSoure.qml (renamed from tests/auto/quick/qmltests2/data/tst_viewSoure.qml)2
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir (renamed from tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/qmldir)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/TestParams/FilePickerParams.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml (renamed from tests/auto/quick/qmltests2/mock-delegates/TestParams/JSDialogParams.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir (renamed from tests/auto/quick/qmltests2/mock-delegates/TestParams/qmldir)0
-rw-r--r--tests/auto/quick/qmltests/qmltests.pro159
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp12
-rw-r--r--tests/auto/quick/qmltests2/data/favicon.html10
-rw-r--r--tests/auto/quick/qmltests2/data/icons/favicon.pngbin3961 -> 0 bytes
-rw-r--r--tests/auto/quick/qmltests2/data/test1.html6
-rw-r--r--tests/auto/quick/qmltests2/data/test2.html6
-rw-r--r--tests/auto/quick/qmltests2/qmltests2.pro79
-rw-r--r--tests/auto/quick/qmltests2/tst_qmltests2.cpp127
-rw-r--r--tests/auto/quick/qmltests_ssl/data/TestWebEngineView.qml122
-rw-r--r--tests/auto/quick/qmltests_ssl/qmltests_ssl.pro10
-rw-r--r--tests/auto/quick/qmltests_ssl/tst_qmltests_ssl.cpp160
-rw-r--r--tests/auto/quick/qquickwebengineview/BLACKLIST2
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp46
-rw-r--r--tests/auto/quick/quick.pro14
-rw-r--r--tests/auto/quick/shared/util.h2
74 files changed, 736 insertions, 834 deletions
diff --git a/tests/auto/quick/certificateerror/WebView.qml b/tests/auto/quick/certificateerror/WebView.qml
new file mode 100644
index 000000000..97abdfb98
--- /dev/null
+++ b/tests/auto/quick/certificateerror/WebView.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtWebEngine 1.4
+import QtQuick.Window 2.0
+import QtTest 1.0
+import io.qt.tester 1.0
+
+Window {
+ width: 50
+ height: 50
+ visible: true
+
+ TestHandler {
+ id: handler
+ onLoadPage: function(url) {
+ view.url = url
+ }
+ }
+
+ WebEngineView {
+ id: view
+ anchors.fill: parent
+ onLoadingChanged: function(request) {
+ if (request.status === WebEngineView.LoadSucceededStatus) {
+ handler.loadSuccess = true
+ } else if (request.status === WebEngineView.LoadFailedStatus) {
+ handler.loadSuccess = false
+ }
+ }
+ onCertificateError: function(error) {
+ handler.certificateError = error
+ }
+ Component.onCompleted: {
+ view.settings.errorPageEnabled = false
+ }
+ }
+}
diff --git a/tests/auto/quick/certificateerror/certificateerror.pro b/tests/auto/quick/certificateerror/certificateerror.pro
new file mode 100644
index 000000000..27d5a3cc1
--- /dev/null
+++ b/tests/auto/quick/certificateerror/certificateerror.pro
@@ -0,0 +1,7 @@
+include(../tests.pri)
+include(../../shared/https.pri)
+QT *= webenginecore-private webengine webengine-private
+HEADERS += $$PWD/testhandler.h
+SOURCES += $$PWD/testhandler.cpp
+RESOURCES += certificateerror.qrc
+
diff --git a/tests/auto/quick/certificateerror/certificateerror.qrc b/tests/auto/quick/certificateerror/certificateerror.qrc
new file mode 100644
index 000000000..bfc3013e7
--- /dev/null
+++ b/tests/auto/quick/certificateerror/certificateerror.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>WebView.qml</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/quick/certificateerror/testhandler.cpp b/tests/auto/quick/certificateerror/testhandler.cpp
new file mode 100644
index 000000000..cb6710aa3
--- /dev/null
+++ b/tests/auto/quick/certificateerror/testhandler.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 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$
+**
+****************************************************************************/
+
+#include "testhandler.h"
+
+TestHandler::TestHandler(QObject *parent) : QObject(parent)
+{
+ setObjectName(QStringLiteral("TestListner"));
+}
+
+void TestHandler::load(const QUrl &page)
+{
+ emit loadPage(page);
+}
+
+void TestHandler::setLoadSuccess(bool success)
+{
+ if (m_loadSuccess != success) {
+ m_loadSuccess = success;
+ emit loadSuccessChanged();
+ }
+}
+
+bool TestHandler::loadSuccess() const
+{
+ return m_loadSuccess;
+}
+
+QWebEngineCertificateError TestHandler::certificateError() const
+{
+ return *m_error;
+}
+
+void TestHandler::setCertificateError(QWebEngineCertificateError error)
+{
+ m_error = new QWebEngineCertificateError(error);
+ emit certificateErrorChanged();
+}
diff --git a/tests/auto/quick/certificateerror/testhandler.h b/tests/auto/quick/certificateerror/testhandler.h
new file mode 100644
index 000000000..a6d95d9a9
--- /dev/null
+++ b/tests/auto/quick/certificateerror/testhandler.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 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$
+**
+****************************************************************************/
+
+#ifndef TESTHANDLER_H
+#define TESTHANDLER_H
+
+#include <QWebEngineCertificateError>
+
+class TestHandler : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QWebEngineCertificateError certificateError READ certificateError WRITE
+ setCertificateError NOTIFY certificateErrorChanged)
+ Q_PROPERTY(bool loadSuccess READ loadSuccess WRITE setLoadSuccess NOTIFY loadSuccessChanged)
+public:
+ explicit TestHandler(QObject *parent = nullptr);
+ QWebEngineCertificateError certificateError() const;
+
+ void setCertificateError(QWebEngineCertificateError error);
+ void setLoadSuccess(bool success);
+ bool loadSuccess() const;
+ void load(const QUrl &page);
+
+signals:
+ void loadPage(const QUrl &page);
+ void certificateErrorChanged();
+ void loadSuccessChanged();
+
+private:
+ QWebEngineCertificateError *m_error = nullptr;
+ bool m_loadSuccess = false;
+};
+
+#endif // TESTHANDLER_H
diff --git a/tests/auto/quick/certificateerror/tst_certificateerror.cpp b/tests/auto/quick/certificateerror/tst_certificateerror.cpp
new file mode 100644
index 000000000..3e2dc85fb
--- /dev/null
+++ b/tests/auto/quick/certificateerror/tst_certificateerror.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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$
+**
+****************************************************************************/
+#include "testhandler.h"
+#include <httpsserver.h>
+#include <util.h>
+#include <QWebEngineCertificateError>
+#include <QQuickWebEngineProfile>
+#include <QQmlApplicationEngine>
+#include <QQuickWindow>
+#include <QtTest/QtTest>
+
+class tst_CertificateError : public QObject
+{
+ Q_OBJECT
+public:
+ tst_CertificateError() { }
+
+private Q_SLOTS:
+ void initTestCase();
+ void handleError_data();
+ void handleError();
+
+private:
+ QScopedPointer<QQmlApplicationEngine> m_engine;
+ QQuickWindow *m_widnow = nullptr;
+ TestHandler *m_handler = nullptr;
+};
+
+void tst_CertificateError::initTestCase()
+{
+ QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
+ qmlRegisterType<TestHandler>("io.qt.tester", 1, 0, "TestHandler");
+ m_engine.reset(new QQmlApplicationEngine());
+ m_engine->load(QUrl(QStringLiteral("qrc:/WebView.qml")));
+ m_widnow = qobject_cast<QQuickWindow *>(m_engine->rootObjects().first());
+ Q_ASSERT(m_widnow);
+ m_handler = m_widnow->findChild<TestHandler *>(QStringLiteral("TestListner"));
+ Q_ASSERT(m_handler);
+}
+
+void tst_CertificateError::handleError_data()
+{
+ QTest::addColumn<bool>("deferError");
+ QTest::addColumn<bool>("acceptCertificate");
+ QTest::addColumn<QString>("expectedContent");
+ QTest::addRow("Reject") << false << false << QString();
+ QTest::addRow("DeferReject") << true << false << QString();
+ QTest::addRow("DeferAccept") << true << true << "TEST";
+}
+
+void tst_CertificateError::handleError()
+{
+ HttpsServer server;
+ server.setExpectError(true);
+ QVERIFY(server.start());
+
+ connect(&server, &HttpsServer::newRequest, [&](HttpReqRep *rr) {
+ rr->setResponseBody(QByteArrayLiteral("<html><body>TEST</body></html>"));
+ rr->sendResponse();
+ });
+
+ QFETCH(bool, deferError);
+ QFETCH(bool, acceptCertificate);
+ QFETCH(QString, expectedContent);
+
+ QSignalSpy certificateErrorSpy(m_handler, &TestHandler::certificateErrorChanged);
+ m_handler->load(server.url());
+ QTRY_COMPARE(certificateErrorSpy.count(), 1);
+ QWebEngineCertificateError error = m_handler->certificateError();
+
+ if (deferError) {
+ error.defer();
+ return;
+ }
+
+ if (acceptCertificate)
+ error.acceptCertificate();
+ else
+ error.rejectCertificate();
+
+ QVERIFY(error.isOverridable());
+ auto chain = error.certificateChain();
+ QCOMPARE(chain.size(), 2);
+ QCOMPARE(chain[0].serialNumber(), "3b:dd:1a:b7:2f:40:32:3b:c1:bf:37:d4:86:bd:56:c1:d0:6b:2a:43");
+ QCOMPARE(chain[1].serialNumber(), "6d:52:fb:b4:57:3b:b2:03:c8:62:7b:7e:44:45:5c:d3:08:87:74:17");
+
+ if (deferError) {
+ QVERIFY(!m_handler->loadSuccess());
+
+ if (acceptCertificate)
+ error.acceptCertificate();
+ else
+ error.rejectCertificate();
+ }
+ QTRY_COMPARE_WITH_TIMEOUT(m_handler->loadSuccess(), acceptCertificate, 3000);
+}
+
+static QByteArrayList params;
+W_QTEST_MAIN(tst_CertificateError, params)
+#include <tst_certificateerror.moc>
diff --git a/tests/auto/quick/dialogs/tst_dialogs.cpp b/tests/auto/quick/dialogs/tst_dialogs.cpp
index 4df296bcd..8f2e79d3b 100644
--- a/tests/auto/quick/dialogs/tst_dialogs.cpp
+++ b/tests/auto/quick/dialogs/tst_dialogs.cpp
@@ -31,7 +31,7 @@
#include "util.h"
#include <QtWebEngine/private/qquickwebenginedialogrequests_p.h>
-#include <QtWebEngine/private/qquickwebenginecontextmenurequest_p.h>
+#include <QtWebEngineCore/qwebenginecontextmenurequest.h>
#include <QQuickWebEngineProfile>
#include <QNetworkProxy>
@@ -122,7 +122,7 @@ void tst_Dialogs::contextMenuRequested()
QSignalSpy dialogSpy(m_listener, &TestHandler::requestChanged);
QTest::mouseClick(m_window, Qt::RightButton);
QTRY_COMPARE(dialogSpy.count(), 1);
- auto dialog = qobject_cast<QQuickWebEngineContextMenuRequest*>(m_listener->request());
+ auto dialog = qobject_cast<QWebEngineContextMenuRequest *>(m_listener->request());
QVERIFY2(dialog, "Incorrect dialog requested");
}
diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
index 85257fcb7..1f30fce5b 100644
--- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
+++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
@@ -105,8 +105,15 @@ inline QQuickWebEngineView* tst_InspectorServer::webView() const
QJsonArray tst_InspectorServer::fetchPageList() const
{
QNetworkAccessManager qnam;
- QScopedPointer<QNetworkReply> reply(qnam.get(QNetworkRequest(s_inspectorServerHttpBaseUrl.resolved(QUrl("json/list")))));
- QSignalSpy(reply.data(), SIGNAL(finished())).wait();
+ QSignalSpy spy(&qnam, &QNetworkAccessManager::finished);;
+ QNetworkRequest request(s_inspectorServerHttpBaseUrl.resolved(QUrl("json/list")));
+ QScopedPointer<QNetworkReply> reply(qnam.get(request));
+ spy.wait();
+ // Work-around a network bug in Qt6:
+ if (reply->error() == QNetworkReply::ContentNotFoundError) {
+ reply.reset(qnam.get(request));
+ spy.wait();
+ }
return QJsonDocument::fromJson(reply->readAll()).array();
}
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index dad962576..e79ed86de 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -34,24 +34,25 @@
#include <QQmlListProperty>
#include <QtTest/QtTest>
#include <QtWebEngine/QQuickWebEngineProfile>
-#include <QtWebEngine/QQuickWebEngineScript>
+#include <QtWebEngineCore/QWebEngineCertificateError>
#include <QtWebEngineCore/QWebEngineFindTextResult>
+#include <QtWebEngineCore/QWebEngineFullScreenRequest>
#include <QtWebEngineCore/QWebEngineNotification>
#include <QtWebEngineCore/QWebEngineQuotaRequest>
#include <QtWebEngineCore/QWebEngineRegisterProtocolHandlerRequest>
+#include <QtWebEngineCore/QWebEngineContextMenuRequest>
+#include <QtWebEngineCore/QWebEngineDownloadRequest>
+#include <QtWebEngineCore/QWebEngineScript>
#include <private/qquickwebengineview_p.h>
#include <private/qquickwebengineaction_p.h>
-#include <private/qquickwebenginecertificateerror_p.h>
#include <private/qquickwebengineclientcertificateselection_p.h>
#include <private/qquickwebenginedialogrequests_p.h>
-#include <private/qquickwebenginedownloaditem_p.h>
#include <private/qquickwebenginehistory_p.h>
#include <private/qquickwebengineloadrequest_p.h>
#include <private/qquickwebenginenavigationrequest_p.h>
#include <private/qquickwebenginenewviewrequest_p.h>
#include <private/qquickwebenginesettings_p.h>
#include <private/qquickwebenginesingleton_p.h>
-#include <private/qquickwebenginecontextmenurequest_p.h>
class tst_publicapi : public QObject {
Q_OBJECT
@@ -62,19 +63,18 @@ private Q_SLOTS:
static const QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *>()
<< &QQuickWebEngineView::staticMetaObject
<< &QQuickWebEngineAction::staticMetaObject
- << &QQuickWebEngineCertificateError::staticMetaObject
<< &QQuickWebEngineClientCertificateOption::staticMetaObject
<< &QQuickWebEngineClientCertificateSelection::staticMetaObject
- << &QQuickWebEngineDownloadItem::staticMetaObject
+ << &QWebEngineDownloadRequest::staticMetaObject
<< &QQuickWebEngineHistory::staticMetaObject
<< &QQuickWebEngineHistoryListModel::staticMetaObject
<< &QQuickWebEngineLoadRequest::staticMetaObject
<< &QQuickWebEngineNavigationRequest::staticMetaObject
<< &QQuickWebEngineNewViewRequest::staticMetaObject
<< &QQuickWebEngineProfile::staticMetaObject
- << &QQuickWebEngineScript::staticMetaObject
<< &QQuickWebEngineSettings::staticMetaObject
- << &QQuickWebEngineFullScreenRequest::staticMetaObject
+ << &QWebEngineFullScreenRequest::staticMetaObject
+ << &QWebEngineScript::staticMetaObject
<< &QQuickWebEngineSingleton::staticMetaObject
<< &QQuickWebEngineAuthenticationDialogRequest::staticMetaObject
<< &QQuickWebEngineJavaScriptDialogRequest::staticMetaObject
@@ -82,7 +82,8 @@ static const QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *
<< &QQuickWebEngineFileDialogRequest::staticMetaObject
<< &QQuickWebEngineFormValidationMessageRequest::staticMetaObject
<< &QQuickWebEngineTooltipRequest::staticMetaObject
- << &QQuickWebEngineContextMenuRequest::staticMetaObject
+ << &QWebEngineContextMenuRequest::staticMetaObject
+ << &QWebEngineCertificateError::staticMetaObject
<< &QWebEngineQuotaRequest::staticMetaObject
<< &QWebEngineRegisterProtocolHandlerRequest::staticMetaObject
<< &QWebEngineNotification::staticMetaObject
@@ -93,7 +94,7 @@ static QList<const char *> knownEnumNames = QList<const char *>();
static const QStringList hardcodedTypes = QStringList()
<< "QJSValue"
- << "QQmlListProperty<QQuickWebEngineScript>"
+ << "QQmlListProperty<QWebEngineScript>"
<< "QQmlListProperty<QQuickWebEngineClientCertificateOption>"
<< "const QQuickWebEngineClientCertificateOption*"
<< "QQmlWebChannel*"
@@ -103,7 +104,7 @@ static const QStringList hardcodedTypes = QStringList()
<< "const QQuickWebEngineContextMenuData*"
<< "QWebEngineCookieStore*"
<< "Qt::LayoutDirection"
- ;
+ << "QQuickWebEngineScriptCollection*";
static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineAction.text --> QString"
@@ -121,29 +122,31 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineAuthenticationDialogRequest.realm --> QString"
<< "QQuickWebEngineAuthenticationDialogRequest.type --> AuthenticationType"
<< "QQuickWebEngineAuthenticationDialogRequest.url --> QUrl"
- << "QQuickWebEngineCertificateError.CertificateAuthorityInvalid --> Error"
- << "QQuickWebEngineCertificateError.CertificateCommonNameInvalid --> Error"
- << "QQuickWebEngineCertificateError.CertificateContainsErrors --> Error"
- << "QQuickWebEngineCertificateError.CertificateDateInvalid --> Error"
- << "QQuickWebEngineCertificateError.CertificateInvalid --> Error"
- << "QQuickWebEngineCertificateError.CertificateKnownInterceptionBlocked --> Error"
- << "QQuickWebEngineCertificateError.CertificateNameConstraintViolation --> Error"
- << "QQuickWebEngineCertificateError.CertificateNoRevocationMechanism --> Error"
- << "QQuickWebEngineCertificateError.CertificateNonUniqueName --> Error"
- << "QQuickWebEngineCertificateError.CertificateRevoked --> Error"
- << "QQuickWebEngineCertificateError.CertificateTransparencyRequired --> Error"
- << "QQuickWebEngineCertificateError.CertificateUnableToCheckRevocation --> Error"
- << "QQuickWebEngineCertificateError.CertificateValidityTooLong --> Error"
- << "QQuickWebEngineCertificateError.CertificateWeakKey --> Error"
- << "QQuickWebEngineCertificateError.CertificateWeakSignatureAlgorithm --> Error"
- << "QQuickWebEngineCertificateError.SslPinnedKeyNotInCertificateChain --> Error"
- << "QQuickWebEngineCertificateError.defer() --> void"
- << "QQuickWebEngineCertificateError.description --> QString"
- << "QQuickWebEngineCertificateError.error --> Error"
- << "QQuickWebEngineCertificateError.ignoreCertificateError() --> void"
- << "QQuickWebEngineCertificateError.overridable --> bool"
- << "QQuickWebEngineCertificateError.rejectCertificate() --> void"
- << "QQuickWebEngineCertificateError.url --> QUrl"
+ << "QWebEngineCertificateError.CertificateAuthorityInvalid --> Type"
+ << "QWebEngineCertificateError.CertificateCommonNameInvalid --> Type"
+ << "QWebEngineCertificateError.CertificateContainsErrors --> Type"
+ << "QWebEngineCertificateError.CertificateDateInvalid --> Type"
+ << "QWebEngineCertificateError.CertificateInvalid --> Type"
+ << "QWebEngineCertificateError.CertificateKnownInterceptionBlocked --> Type"
+ << "QWebEngineCertificateError.CertificateNameConstraintViolation --> Type"
+ << "QWebEngineCertificateError.CertificateNoRevocationMechanism --> Type"
+ << "QWebEngineCertificateError.CertificateNonUniqueName --> Type"
+ << "QWebEngineCertificateError.CertificateRevoked --> Type"
+ << "QWebEngineCertificateError.CertificateTransparencyRequired --> Type"
+ << "QWebEngineCertificateError.CertificateUnableToCheckRevocation --> Type"
+ << "QWebEngineCertificateError.CertificateValidityTooLong --> Type"
+ << "QWebEngineCertificateError.CertificateWeakKey --> Type"
+ << "QWebEngineCertificateError.CertificateWeakSignatureAlgorithm --> Type"
+ << "QWebEngineCertificateError.CertificateSymantecLegacy --> Type"
+ << "QWebEngineCertificateError.SslObsoleteVersion --> Type"
+ << "QWebEngineCertificateError.SslPinnedKeyNotInCertificateChain --> Type"
+ << "QWebEngineCertificateError.defer() --> void"
+ << "QWebEngineCertificateError.description --> QString"
+ << "QWebEngineCertificateError.type --> Type"
+ << "QWebEngineCertificateError.acceptCertificate() --> void"
+ << "QWebEngineCertificateError.overridable --> bool"
+ << "QWebEngineCertificateError.rejectCertificate() --> void"
+ << "QWebEngineCertificateError.url --> QUrl"
<< "QQuickWebEngineClientCertificateOption.issuer --> QString"
<< "QQuickWebEngineClientCertificateOption.subject --> QString"
<< "QQuickWebEngineClientCertificateOption.effectiveDate --> QDateTime"
@@ -157,118 +160,109 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineClientCertificateSelection.selectNone() --> void"
<< "QQuickWebEngineColorDialogRequest.accepted --> bool"
<< "QQuickWebEngineColorDialogRequest.color --> QColor"
- << "QQuickWebEngineContextMenuRequest.CanUndo --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanRedo --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanCut --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanCopy --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanPaste --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanDelete --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanSelectAll --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanTranslate --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.CanEditRichly --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanUndo --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanRedo --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanCut --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanCopy --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanPaste --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanDelete --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanSelectAll --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanTranslate --> EditFlags"
+ << "QWebEngineContextMenuRequest.CanEditRichly --> EditFlags"
<< "QQuickWebEngineColorDialogRequest.dialogAccept(QColor) --> void"
<< "QQuickWebEngineColorDialogRequest.dialogReject() --> void"
- << "QQuickWebEngineContextMenuRequest.editFlags --> EditFlags"
- << "QQuickWebEngineContextMenuRequest.MediaInError --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaPaused --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaMuted --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaLoop --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaCanSave --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaHasAudio --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaCanToggleControls --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaControls --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaCanPrint --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaCanRotate --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.MediaTypeAudio --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypeCanvas --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypeFile --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypeImage --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypeNone --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypePlugin --> MediaType"
- << "QQuickWebEngineContextMenuRequest.MediaTypeVideo --> MediaType"
- << "QQuickWebEngineContextMenuRequest.accepted --> bool"
- << "QQuickWebEngineContextMenuRequest.isContentEditable --> bool"
- << "QQuickWebEngineContextMenuRequest.linkText --> QString"
- << "QQuickWebEngineContextMenuRequest.linkUrl --> QUrl"
- << "QQuickWebEngineContextMenuRequest.mediaFlags --> MediaFlags"
- << "QQuickWebEngineContextMenuRequest.mediaType --> MediaType"
- << "QQuickWebEngineContextMenuRequest.mediaUrl --> QUrl"
- << "QQuickWebEngineContextMenuRequest.misspelledWord --> QString"
- << "QQuickWebEngineContextMenuRequest.selectedText --> QString"
- << "QQuickWebEngineContextMenuRequest.spellCheckerSuggestions --> QStringList"
- << "QQuickWebEngineContextMenuRequest.x --> int"
- << "QQuickWebEngineContextMenuRequest.y --> int"
- << "QQuickWebEngineDownloadItem.Attachment --> DownloadType"
- << "QQuickWebEngineDownloadItem.CompleteHtmlSaveFormat --> SavePageFormat"
- << "QQuickWebEngineDownloadItem.DownloadAttribute --> DownloadType"
- << "QQuickWebEngineDownloadItem.DownloadCancelled --> DownloadState"
- << "QQuickWebEngineDownloadItem.DownloadCompleted --> DownloadState"
- << "QQuickWebEngineDownloadItem.DownloadInProgress --> DownloadState"
- << "QQuickWebEngineDownloadItem.DownloadInterrupted --> DownloadState"
- << "QQuickWebEngineDownloadItem.DownloadRequested --> DownloadState"
- << "QQuickWebEngineDownloadItem.FileAccessDenied --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileBlocked --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileFailed --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileHashMismatch --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileNameTooLong --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileNoSpace --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileSecurityCheckFailed --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileTooLarge --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileTooShort --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileTransientError --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.FileVirusInfected --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.MimeHtmlSaveFormat --> SavePageFormat"
- << "QQuickWebEngineDownloadItem.NetworkDisconnected --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.NetworkFailed --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.NetworkInvalidRequest --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.NetworkServerDown --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.NetworkTimeout --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.NoReason --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.SavePage --> DownloadType"
- << "QQuickWebEngineDownloadItem.ServerBadContent --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.ServerCertProblem --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.ServerFailed --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.ServerForbidden --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.ServerUnauthorized --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.ServerUnreachable --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.SingleHtmlSaveFormat --> SavePageFormat"
- << "QQuickWebEngineDownloadItem.UnknownSaveFormat --> SavePageFormat"
- << "QQuickWebEngineDownloadItem.UserCanceled --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.UserRequested --> DownloadType"
- << "QQuickWebEngineDownloadItem.accept() --> void"
- << "QQuickWebEngineDownloadItem.cancel() --> void"
- << "QQuickWebEngineDownloadItem.id --> uint"
- << "QQuickWebEngineDownloadItem.interruptReason --> DownloadInterruptReason"
- << "QQuickWebEngineDownloadItem.interruptReasonChanged() --> void"
- << "QQuickWebEngineDownloadItem.interruptReasonString --> QString"
- << "QQuickWebEngineDownloadItem.isFinished --> bool"
- << "QQuickWebEngineDownloadItem.isFinishedChanged() --> void"
- << "QQuickWebEngineDownloadItem.isPaused --> bool"
- << "QQuickWebEngineDownloadItem.isPausedChanged() --> void"
- << "QQuickWebEngineDownloadItem.isSavePageDownload --> bool"
- << "QQuickWebEngineDownloadItem.mimeType --> QString"
- << "QQuickWebEngineDownloadItem.mimeTypeChanged() --> void"
- << "QQuickWebEngineDownloadItem.path --> QString"
- << "QQuickWebEngineDownloadItem.pathChanged() --> void"
- << "QQuickWebEngineDownloadItem.pause() --> void"
- << "QQuickWebEngineDownloadItem.receivedBytes --> qlonglong"
- << "QQuickWebEngineDownloadItem.receivedBytesChanged() --> void"
- << "QQuickWebEngineDownloadItem.resume() --> void"
- << "QQuickWebEngineDownloadItem.savePageFormat --> SavePageFormat"
- << "QQuickWebEngineDownloadItem.savePageFormatChanged() --> void"
- << "QQuickWebEngineDownloadItem.state --> DownloadState"
- << "QQuickWebEngineDownloadItem.stateChanged() --> void"
- << "QQuickWebEngineDownloadItem.totalBytes --> qlonglong"
- << "QQuickWebEngineDownloadItem.totalBytesChanged() --> void"
- << "QQuickWebEngineDownloadItem.type --> DownloadType"
- << "QQuickWebEngineDownloadItem.typeChanged() --> void"
- << "QQuickWebEngineDownloadItem.view --> QQuickWebEngineView*"
- << "QQuickWebEngineDownloadItem.url --> QUrl"
- << "QQuickWebEngineDownloadItem.suggestedFileName --> QString"
- << "QQuickWebEngineDownloadItem.downloadDirectory --> QString"
- << "QQuickWebEngineDownloadItem.downloadDirectoryChanged() --> void"
- << "QQuickWebEngineDownloadItem.downloadFileName --> QString"
- << "QQuickWebEngineDownloadItem.downloadFileNameChanged() --> void"
+ << "QWebEngineContextMenuRequest.editFlags --> EditFlags"
+ << "QWebEngineContextMenuRequest.MediaInError --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaPaused --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaMuted --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaLoop --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaCanSave --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaHasAudio --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaCanToggleControls --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaControls --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaCanPrint --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaCanRotate --> MediaFlags"
+ << "QWebEngineContextMenuRequest.MediaTypeAudio --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypeCanvas --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypeFile --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypeImage --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypeNone --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypePlugin --> MediaType"
+ << "QWebEngineContextMenuRequest.MediaTypeVideo --> MediaType"
+ << "QWebEngineContextMenuRequest.accepted --> bool"
+ << "QWebEngineContextMenuRequest.isContentEditable --> bool"
+ << "QWebEngineContextMenuRequest.linkText --> QString"
+ << "QWebEngineContextMenuRequest.linkUrl --> QUrl"
+ << "QWebEngineContextMenuRequest.mediaFlags --> MediaFlags"
+ << "QWebEngineContextMenuRequest.mediaType --> MediaType"
+ << "QWebEngineContextMenuRequest.mediaUrl --> QUrl"
+ << "QWebEngineContextMenuRequest.misspelledWord --> QString"
+ << "QWebEngineContextMenuRequest.selectedText --> QString"
+ << "QWebEngineContextMenuRequest.spellCheckerSuggestions --> QStringList"
+ << "QWebEngineContextMenuRequest.position --> QPoint"
+ << "QWebEngineDownloadRequest.CompleteHtmlSaveFormat --> SavePageFormat"
+ << "QWebEngineDownloadRequest.DownloadCancelled --> DownloadState"
+ << "QWebEngineDownloadRequest.DownloadCompleted --> DownloadState"
+ << "QWebEngineDownloadRequest.DownloadInProgress --> DownloadState"
+ << "QWebEngineDownloadRequest.DownloadInterrupted --> DownloadState"
+ << "QWebEngineDownloadRequest.DownloadRequested --> DownloadState"
+ << "QWebEngineDownloadRequest.FileAccessDenied --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileBlocked --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileFailed --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileHashMismatch --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileNameTooLong --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileNoSpace --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileSecurityCheckFailed --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileTooLarge --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileTooShort --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileTransientError --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.FileVirusInfected --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.MimeHtmlSaveFormat --> SavePageFormat"
+ << "QWebEngineDownloadRequest.NetworkDisconnected --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.NetworkFailed --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.NetworkInvalidRequest --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.NetworkServerDown --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.NetworkTimeout --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.NoReason --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerBadContent --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerCertProblem --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerFailed --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerForbidden --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerUnauthorized --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.ServerUnreachable --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.SingleHtmlSaveFormat --> SavePageFormat"
+ << "QWebEngineDownloadRequest.UnknownSaveFormat --> SavePageFormat"
+ << "QWebEngineDownloadRequest.UserCanceled --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.accept() --> void"
+ << "QWebEngineDownloadRequest.cancel() --> void"
+ << "QWebEngineDownloadRequest.id --> uint"
+ << "QWebEngineDownloadRequest.interruptReason --> DownloadInterruptReason"
+ << "QWebEngineDownloadRequest.interruptReasonChanged() --> void"
+ << "QWebEngineDownloadRequest.interruptReasonString --> QString"
+ << "QWebEngineDownloadRequest.isFinished --> bool"
+ << "QWebEngineDownloadRequest.isFinishedChanged() --> void"
+ << "QWebEngineDownloadRequest.isPaused --> bool"
+ << "QWebEngineDownloadRequest.isPausedChanged() --> void"
+ << "QWebEngineDownloadRequest.isSavePageDownload --> bool"
+ << "QWebEngineDownloadRequest.mimeType --> QString"
+ << "QWebEngineDownloadRequest.pause() --> void"
+ << "QWebEngineDownloadRequest.receivedBytes --> qlonglong"
+ << "QWebEngineDownloadRequest.receivedBytesChanged() --> void"
+ << "QWebEngineDownloadRequest.resume() --> void"
+ << "QWebEngineDownloadRequest.savePageFormat --> SavePageFormat"
+ << "QWebEngineDownloadRequest.savePageFormatChanged() --> void"
+ << "QWebEngineDownloadRequest.state --> DownloadState"
+ << "QWebEngineDownloadRequest.stateChanged(QWebEngineDownloadRequest::DownloadState) --> void"
+ << "QWebEngineDownloadRequest.totalBytes --> qlonglong"
+ << "QWebEngineDownloadRequest.totalBytesChanged() --> void"
+ // FIXME << "QWebEngineDownloadRequest.view --> QQuickWebEngineView*"
+ << "QWebEngineDownloadRequest.url --> QUrl"
+ << "QWebEngineDownloadRequest.suggestedFileName --> QString"
+ << "QWebEngineDownloadRequest.downloadDirectory --> QString"
+ << "QWebEngineDownloadRequest.downloadDirectoryChanged() --> void"
+ << "QWebEngineDownloadRequest.downloadFileName --> QString"
+ << "QWebEngineDownloadRequest.downloadFileNameChanged() --> void"
+ << "QWebEngineDownloadRequest.downloadProgress(qlonglong,qlonglong) --> void" // FIXME
<< "QQuickWebEngineFileDialogRequest.FileModeOpen --> FileMode"
<< "QQuickWebEngineFileDialogRequest.FileModeOpenMultiple --> FileMode"
<< "QQuickWebEngineFileDialogRequest.FileModeSave --> FileMode"
@@ -296,10 +290,10 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineTooltipRequest.text --> QString"
<< "QQuickWebEngineTooltipRequest.type --> RequestType"
<< "QQuickWebEngineTooltipRequest.accepted --> bool"
- << "QQuickWebEngineFullScreenRequest.accept() --> void"
- << "QQuickWebEngineFullScreenRequest.origin --> QUrl"
- << "QQuickWebEngineFullScreenRequest.reject() --> void"
- << "QQuickWebEngineFullScreenRequest.toggleOn --> bool"
+ << "QWebEngineFullScreenRequest.accept() --> void"
+ << "QWebEngineFullScreenRequest.origin --> QUrl"
+ << "QWebEngineFullScreenRequest.reject() --> void"
+ << "QWebEngineFullScreenRequest.toggleOn --> bool"
<< "QQuickWebEngineHistory.backItems --> QQuickWebEngineHistoryListModel*"
<< "QQuickWebEngineHistory.clear() --> void"
<< "QQuickWebEngineHistory.forwardItems --> QQuickWebEngineHistoryListModel*"
@@ -340,8 +334,8 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineProfile.cachePath --> QString"
<< "QQuickWebEngineProfile.cachePathChanged() --> void"
<< "QQuickWebEngineProfile.clearHttpCache() --> void"
- << "QQuickWebEngineProfile.downloadFinished(QQuickWebEngineDownloadItem*) --> void"
- << "QQuickWebEngineProfile.downloadRequested(QQuickWebEngineDownloadItem*) --> void"
+ << "QQuickWebEngineProfile.downloadFinished(QWebEngineDownloadRequest*) --> void"
+ << "QQuickWebEngineProfile.downloadRequested(QWebEngineDownloadRequest*) --> void"
<< "QQuickWebEngineProfile.downloadPath --> QString"
<< "QQuickWebEngineProfile.downloadPathChanged() --> void"
<< "QQuickWebEngineProfile.presentNotification(QWebEngineNotification*) --> void"
@@ -367,32 +361,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineProfile.storageNameChanged() --> void"
<< "QQuickWebEngineProfile.useForGlobalCertificateVerification --> bool"
<< "QQuickWebEngineProfile.useForGlobalCertificateVerificationChanged() --> void"
- << "QQuickWebEngineProfile.userScripts --> QQmlListProperty<QQuickWebEngineScript>"
- << "QQuickWebEngineScript.ApplicationWorld --> ScriptWorldId"
- << "QQuickWebEngineScript.Deferred --> InjectionPoint"
- << "QQuickWebEngineScript.DocumentCreation --> InjectionPoint"
- << "QQuickWebEngineScript.DocumentReady --> InjectionPoint"
- << "QQuickWebEngineScript.MainWorld --> ScriptWorldId"
- << "QQuickWebEngineScript.UserWorld --> ScriptWorldId"
- << "QQuickWebEngineScript.injectionPoint --> InjectionPoint"
- << "QQuickWebEngineScript.injectionPointChanged(InjectionPoint) --> void"
- << "QQuickWebEngineScript.name --> QString"
- << "QQuickWebEngineScript.nameChanged(QString) --> void"
- << "QQuickWebEngineScript.runOnSubframes --> bool"
- << "QQuickWebEngineScript.runOnSubframesChanged(bool) --> void"
- << "QQuickWebEngineScript.setInjectionPoint(InjectionPoint) --> void"
- << "QQuickWebEngineScript.setName(QString) --> void"
- << "QQuickWebEngineScript.setRunOnSubframes(bool) --> void"
- << "QQuickWebEngineScript.setSourceCode(QString) --> void"
- << "QQuickWebEngineScript.setSourceUrl(QUrl) --> void"
- << "QQuickWebEngineScript.setWorldId(ScriptWorldId) --> void"
- << "QQuickWebEngineScript.sourceCode --> QString"
- << "QQuickWebEngineScript.sourceCodeChanged(QString) --> void"
- << "QQuickWebEngineScript.sourceUrl --> QUrl"
- << "QQuickWebEngineScript.sourceUrlChanged(QUrl) --> void"
- << "QQuickWebEngineScript.toString() --> QString"
- << "QQuickWebEngineScript.worldId --> ScriptWorldId"
- << "QQuickWebEngineScript.worldIdChanged(ScriptWorldId) --> void"
+ << "QQuickWebEngineProfile.userScripts --> QQuickWebEngineScriptCollection*"
<< "QQuickWebEngineSettings.AllowAllUnknownUrlSchemes --> UnknownUrlSchemePolicy"
<< "QQuickWebEngineSettings.AllowUnknownUrlSchemesFromUserInteraction --> UnknownUrlSchemePolicy"
<< "QQuickWebEngineSettings.DisallowUnknownUrlSchemes --> UnknownUrlSchemePolicy"
@@ -460,6 +429,19 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineSettings.webRTCPublicInterfacesOnlyChanged() --> void"
<< "QQuickWebEngineSingleton.defaultProfile --> QQuickWebEngineProfile*"
<< "QQuickWebEngineSingleton.settings --> QQuickWebEngineSettings*"
+ << "QQuickWebEngineSingleton.script() --> QWebEngineScript"
+ << "QWebEngineScript.ApplicationWorld --> ScriptWorldId"
+ << "QWebEngineScript.Deferred --> InjectionPoint"
+ << "QWebEngineScript.DocumentCreation --> InjectionPoint"
+ << "QWebEngineScript.DocumentReady --> InjectionPoint"
+ << "QWebEngineScript.MainWorld --> ScriptWorldId"
+ << "QWebEngineScript.UserWorld --> ScriptWorldId"
+ << "QWebEngineScript.injectionPoint --> InjectionPoint"
+ << "QWebEngineScript.name --> QString"
+ << "QWebEngineScript.runsOnSubFrames --> bool"
+ << "QWebEngineScript.sourceCode --> QString"
+ << "QWebEngineScript.sourceUrl --> QUrl"
+ << "QWebEngineScript.worldId --> uint"
<< "QQuickWebEngineView.action(WebAction) --> QQuickWebEngineAction*"
<< "QQuickWebEngineView.A0 --> PrintedPageSizeId"
<< "QQuickWebEngineView.A1 --> PrintedPageSizeId"
@@ -688,11 +670,11 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.backgroundColorChanged() --> void"
<< "QQuickWebEngineView.canGoBack --> bool"
<< "QQuickWebEngineView.canGoForward --> bool"
- << "QQuickWebEngineView.certificateError(QQuickWebEngineCertificateError*) --> void"
+ << "QQuickWebEngineView.certificateError(QWebEngineCertificateError) --> void"
<< "QQuickWebEngineView.colorDialogRequested(QQuickWebEngineColorDialogRequest*) --> void"
<< "QQuickWebEngineView.contentsSize --> QSizeF"
<< "QQuickWebEngineView.contentsSizeChanged(QSizeF) --> void"
- << "QQuickWebEngineView.contextMenuRequested(QQuickWebEngineContextMenuRequest*) --> void"
+ << "QQuickWebEngineView.contextMenuRequested(QWebEngineContextMenuRequest*) --> void"
<< "QQuickWebEngineView.devToolsView --> QQuickWebEngineView*"
<< "QQuickWebEngineView.devToolsViewChanged() --> void"
<< "QQuickWebEngineView.featurePermissionRequested(QUrl,Feature) --> void"
@@ -703,7 +685,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.findTextFinished(QWebEngineFindTextResult) --> void"
<< "QQuickWebEngineView.formValidationMessageRequested(QQuickWebEngineFormValidationMessageRequest*) --> void"
<< "QQuickWebEngineView.fullScreenCancelled() --> void"
- << "QQuickWebEngineView.fullScreenRequested(QQuickWebEngineFullScreenRequest) --> void"
+ << "QQuickWebEngineView.fullScreenRequested(QWebEngineFullScreenRequest) --> void"
<< "QQuickWebEngineView.geometryChangeRequested(QRect,QRect) --> void"
<< "QQuickWebEngineView.goBack() --> void"
<< "QQuickWebEngineView.goBackOrForward(int) --> void"
@@ -771,8 +753,10 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.triggerWebAction(WebAction) --> void"
<< "QQuickWebEngineView.url --> QUrl"
<< "QQuickWebEngineView.urlChanged() --> void"
- << "QQuickWebEngineView.userScripts --> QQmlListProperty<QQuickWebEngineScript>"
+ << "QQuickWebEngineView.userScripts --> QQuickWebEngineScriptCollection*"
+#if QT_CONFIG(webengine_webchannel)
<< "QQuickWebEngineView.webChannel --> QQmlWebChannel*"
+#endif
<< "QQuickWebEngineView.webChannelChanged() --> void"
<< "QQuickWebEngineView.webChannelWorld --> uint"
<< "QQuickWebEngineView.webChannelWorldChanged(uint) --> void"
diff --git a/tests/auto/quick/qmltests2/data/accepttypes.html b/tests/auto/quick/qmltests/data/accepttypes.html
index aff39f96e..aff39f96e 100644
--- a/tests/auto/quick/qmltests2/data/accepttypes.html
+++ b/tests/auto/quick/qmltests/data/accepttypes.html
diff --git a/tests/auto/quick/qmltests2/data/alert.html b/tests/auto/quick/qmltests/data/alert.html
index 89715a727..89715a727 100644
--- a/tests/auto/quick/qmltests2/data/alert.html
+++ b/tests/auto/quick/qmltests/data/alert.html
diff --git a/tests/auto/quick/qmltests2/data/confirm.html b/tests/auto/quick/qmltests/data/confirm.html
index a4fc5b532..a4fc5b532 100644
--- a/tests/auto/quick/qmltests2/data/confirm.html
+++ b/tests/auto/quick/qmltests/data/confirm.html
diff --git a/tests/auto/quick/qmltests2/data/confirmclose.html b/tests/auto/quick/qmltests/data/confirmclose.html
index c2acbb67f..c2acbb67f 100644
--- a/tests/auto/quick/qmltests2/data/confirmclose.html
+++ b/tests/auto/quick/qmltests/data/confirmclose.html
diff --git a/tests/auto/quick/qmltests2/data/directoryupload.html b/tests/auto/quick/qmltests/data/directoryupload.html
index adc408ebb..adc408ebb 100644
--- a/tests/auto/quick/qmltests2/data/directoryupload.html
+++ b/tests/auto/quick/qmltests/data/directoryupload.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-candidates-gray.html b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
index ebea35b02..ebea35b02 100644
--- a/tests/auto/quick/qmltests2/data/favicon-candidates-gray.html
+++ b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-misc.html b/tests/auto/quick/qmltests/data/favicon-misc.html
index 9e788bdf4..9e788bdf4 100644
--- a/tests/auto/quick/qmltests2/data/favicon-misc.html
+++ b/tests/auto/quick/qmltests/data/favicon-misc.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-multi-gray.html b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
index 24b71640f..24b71640f 100644
--- a/tests/auto/quick/qmltests2/data/favicon-multi-gray.html
+++ b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-multi.html b/tests/auto/quick/qmltests/data/favicon-multi.html
index cc5f3fd66..cc5f3fd66 100644
--- a/tests/auto/quick/qmltests2/data/favicon-multi.html
+++ b/tests/auto/quick/qmltests/data/favicon-multi.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-shortcut.html b/tests/auto/quick/qmltests/data/favicon-shortcut.html
index 786cdb816..786cdb816 100644
--- a/tests/auto/quick/qmltests2/data/favicon-shortcut.html
+++ b/tests/auto/quick/qmltests/data/favicon-shortcut.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-single.html b/tests/auto/quick/qmltests/data/favicon-single.html
index eb4675c75..eb4675c75 100644
--- a/tests/auto/quick/qmltests2/data/favicon-single.html
+++ b/tests/auto/quick/qmltests/data/favicon-single.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-touch.html b/tests/auto/quick/qmltests/data/favicon-touch.html
index 271783434..271783434 100644
--- a/tests/auto/quick/qmltests2/data/favicon-touch.html
+++ b/tests/auto/quick/qmltests/data/favicon-touch.html
diff --git a/tests/auto/quick/qmltests2/data/favicon-unavailable.html b/tests/auto/quick/qmltests/data/favicon-unavailable.html
index c45664294..c45664294 100644
--- a/tests/auto/quick/qmltests2/data/favicon-unavailable.html
+++ b/tests/auto/quick/qmltests/data/favicon-unavailable.html
diff --git a/tests/auto/quick/qmltests2/data/favicon2.html b/tests/auto/quick/qmltests/data/favicon2.html
index 81c2690fe..81c2690fe 100644
--- a/tests/auto/quick/qmltests2/data/favicon2.html
+++ b/tests/auto/quick/qmltests/data/favicon2.html
diff --git a/tests/auto/quick/qmltests2/data/icons/gray128.png b/tests/auto/quick/qmltests/data/icons/gray128.png
index bf1cfaba0..bf1cfaba0 100644
--- a/tests/auto/quick/qmltests2/data/icons/gray128.png
+++ b/tests/auto/quick/qmltests/data/icons/gray128.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/gray16.png b/tests/auto/quick/qmltests/data/icons/gray16.png
index 2a1a91a76..2a1a91a76 100644
--- a/tests/auto/quick/qmltests2/data/icons/gray16.png
+++ b/tests/auto/quick/qmltests/data/icons/gray16.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/gray255.png b/tests/auto/quick/qmltests/data/icons/gray255.png
index 549169551..549169551 100644
--- a/tests/auto/quick/qmltests2/data/icons/gray255.png
+++ b/tests/auto/quick/qmltests/data/icons/gray255.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/gray32.png b/tests/auto/quick/qmltests/data/icons/gray32.png
index b269a528f..b269a528f 100644
--- a/tests/auto/quick/qmltests2/data/icons/gray32.png
+++ b/tests/auto/quick/qmltests/data/icons/gray32.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/gray64.png b/tests/auto/quick/qmltests/data/icons/gray64.png
index e02559e5b..e02559e5b 100644
--- a/tests/auto/quick/qmltests2/data/icons/gray64.png
+++ b/tests/auto/quick/qmltests/data/icons/gray64.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/grayicons.ico b/tests/auto/quick/qmltests/data/icons/grayicons.ico
index 8d8fee839..8d8fee839 100644
--- a/tests/auto/quick/qmltests2/data/icons/grayicons.ico
+++ b/tests/auto/quick/qmltests/data/icons/grayicons.ico
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/qt144.png b/tests/auto/quick/qmltests/data/icons/qt144.png
index 050b1e066..050b1e066 100644
--- a/tests/auto/quick/qmltests2/data/icons/qt144.png
+++ b/tests/auto/quick/qmltests/data/icons/qt144.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/qt32.ico b/tests/auto/quick/qmltests/data/icons/qt32.ico
index 2f6fcb5bc..2f6fcb5bc 100644
--- a/tests/auto/quick/qmltests2/data/icons/qt32.ico
+++ b/tests/auto/quick/qmltests/data/icons/qt32.ico
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/qtmulti.ico b/tests/auto/quick/qmltests/data/icons/qtmulti.ico
index 81e5a22e8..81e5a22e8 100644
--- a/tests/auto/quick/qmltests2/data/icons/qtmulti.ico
+++ b/tests/auto/quick/qmltests/data/icons/qtmulti.ico
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/icons/small-favicon.png b/tests/auto/quick/qmltests/data/icons/small-favicon.png
index 8cf9a50a4..8cf9a50a4 100644
--- a/tests/auto/quick/qmltests2/data/icons/small-favicon.png
+++ b/tests/auto/quick/qmltests/data/icons/small-favicon.png
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/multifileupload.html b/tests/auto/quick/qmltests/data/multifileupload.html
index d41ea15c0..d41ea15c0 100644
--- a/tests/auto/quick/qmltests2/data/multifileupload.html
+++ b/tests/auto/quick/qmltests/data/multifileupload.html
diff --git a/tests/auto/quick/qmltests2/data/prompt.html b/tests/auto/quick/qmltests/data/prompt.html
index 3293c0dcf..3293c0dcf 100644
--- a/tests/auto/quick/qmltests2/data/prompt.html
+++ b/tests/auto/quick/qmltests/data/prompt.html
diff --git a/tests/auto/quick/qmltests2/data/singlefileupload.html b/tests/auto/quick/qmltests/data/singlefileupload.html
index ac91c2c0d..ac91c2c0d 100644
--- a/tests/auto/quick/qmltests2/data/singlefileupload.html
+++ b/tests/auto/quick/qmltests/data/singlefileupload.html
diff --git a/tests/auto/quick/qmltests2/data/titleupdate.js b/tests/auto/quick/qmltests/data/titleupdate.js
index c86139c13..c86139c13 100644
--- a/tests/auto/quick/qmltests2/data/titleupdate.js
+++ b/tests/auto/quick/qmltests/data/titleupdate.js
diff --git a/tests/auto/quick/qmltests_ssl/data/tst_certificateError.qml b/tests/auto/quick/qmltests/data/tst_certificateError.qml
index 4c252e210..976de88a9 100644
--- a/tests/auto/quick/qmltests_ssl/data/tst_certificateError.qml
+++ b/tests/auto/quick/qmltests/data/tst_certificateError.qml
@@ -83,7 +83,7 @@ TestWebEngineView {
if (deferError)
error.defer()
else if (acceptCertificate)
- error.ignoreCertificateError()
+ error.acceptCertificate()
else
error.rejectCertificate()
}
@@ -98,7 +98,7 @@ TestWebEngineView {
let error = spyError.signalArguments[0][0]
if (data.acceptCertificate)
- error.ignoreCertificateError()
+ error.acceptCertificate()
else
error.rejectCertificate()
}
diff --git a/tests/auto/quick/qmltests/data/tst_download.qml b/tests/auto/quick/qmltests/data/tst_download.qml
index 1b1750dd8..8607d846d 100644
--- a/tests/auto/quick/qmltests/data/tst_download.qml
+++ b/tests/auto/quick/qmltests/data/tst_download.qml
@@ -155,7 +155,7 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1)
compare(downloadUrl, webEngineView.url)
compare(suggestedFileName, "download.zip")
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested)
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested)
verify(!downloadInterruptReason)
}
@@ -179,11 +179,11 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1)
compare(downloadUrl, webEngineView.url)
compare(suggestedFileName, "download.zip")
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested)
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress)
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested)
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress)
downloadFinishedSpy.wait()
compare(totalBytes, receivedBytes)
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted)
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted)
verify(!downloadInterruptReason)
}
@@ -196,8 +196,8 @@ TestWebEngineView {
compare(downloadUrl, webEngineView.url)
compare(suggestedFileName, "download.zip")
compare(downloadFinishedSpy.count, 1)
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadCancelled)
- tryCompare(webEngineView, "downloadInterruptReason", WebEngineDownloadItem.UserCanceled)
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadCancelled)
+ tryCompare(webEngineView, "downloadInterruptReason", WebEngineDownloadRequest.UserCanceled)
}
function test_downloadLocation() {
@@ -230,15 +230,15 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1);
compare(downloadUrl, webEngineView.url);
compare(suggestedFileName, "download.zip");
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested);
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress);
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested);
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress);
compare(downloadedPath, testDownloadProfile.downloadPath + downloadDirectory + downloadFileName);
compare(downloadDirectoryChanged, 1);
compare(downloadFileNameChanged, 1);
compare(downloadPathChanged, 2);
downloadFinishedSpy.wait();
compare(totalBytes, receivedBytes);
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted);
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted);
verify(!downloadInterruptReason);
}
@@ -253,15 +253,15 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1);
compare(downloadUrl, webEngineView.url);
compare(suggestedFileName, "download.zip");
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested);
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress);
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested);
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress);
compare(downloadedPath, testDownloadProfile.downloadPath + downloadDirectory + "download.zip");
compare(downloadDirectoryChanged, 1);
compare(downloadFileNameChanged, 0);
compare(downloadPathChanged, 1);
downloadFinishedSpy.wait();
compare(totalBytes, receivedBytes);
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted);
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted);
verify(!downloadInterruptReason);
// Download the same file to another directory with suggested file name.
@@ -277,15 +277,15 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1);
compare(downloadUrl, webEngineView.url);
compare(suggestedFileName, "download.zip");
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested);
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress);
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested);
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress);
compare(downloadedPath, testDownloadProfile.downloadPath + downloadDirectory + "download.zip");
compare(downloadDirectoryChanged, 1);
compare(downloadFileNameChanged, 0);
compare(downloadPathChanged, 1);
downloadFinishedSpy.wait();
compare(totalBytes, receivedBytes);
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted);
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted);
verify(!downloadInterruptReason);
// Download same file to same directory second time -> file name should be unified.
@@ -301,15 +301,15 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1);
compare(downloadUrl, webEngineView.url);
compare(suggestedFileName, "download.zip");
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested);
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress);
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested);
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress);
compare(downloadedPath, testDownloadProfile.downloadPath + downloadDirectory + "download (1).zip");
compare(downloadDirectoryChanged, 1);
compare(downloadFileNameChanged, 1);
compare(downloadPathChanged, 1);
downloadFinishedSpy.wait();
compare(totalBytes, receivedBytes);
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted);
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted);
verify(!downloadInterruptReason);
}
@@ -323,15 +323,15 @@ TestWebEngineView {
compare(downLoadRequestedSpy.count, 1);
compare(downloadUrl, webEngineView.url);
compare(suggestedFileName, "download.zip");
- compare(downloadState[0], WebEngineDownloadItem.DownloadRequested);
- tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress);
+ compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested);
+ tryCompare(downloadState, "1", WebEngineDownloadRequest.DownloadInProgress);
compare(downloadedPath, testDownloadProfile.downloadPath + downloadedSetPath);
compare(downloadDirectoryChanged, 1);
compare(downloadFileNameChanged, 1);
compare(downloadPathChanged, 2);
downloadFinishedSpy.wait();
compare(totalBytes, receivedBytes);
- tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted);
+ tryCompare(downloadState, "2", WebEngineDownloadRequest.DownloadCompleted);
verify(!downloadInterruptReason);
}
}
diff --git a/tests/auto/quick/qmltests2/data/tst_favicon.qml b/tests/auto/quick/qmltests/data/tst_favicon.qml
index 3f522d91a..3f522d91a 100644
--- a/tests/auto/quick/qmltests2/data/tst_favicon.qml
+++ b/tests/auto/quick/qmltests/data/tst_favicon.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_faviconDownload.qml b/tests/auto/quick/qmltests/data/tst_faviconDownload.qml
index 9aa32279c..9aa32279c 100644
--- a/tests/auto/quick/qmltests2/data/tst_faviconDownload.qml
+++ b/tests/auto/quick/qmltests/data/tst_faviconDownload.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml
index ab30d9e82..ab30d9e82 100644
--- a/tests/auto/quick/qmltests2/data/tst_filePicker.qml
+++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_inputMethod.qml b/tests/auto/quick/qmltests/data/tst_inputMethod.qml
index 0bf9f7eb0..0bf9f7eb0 100644
--- a/tests/auto/quick/qmltests2/data/tst_inputMethod.qml
+++ b/tests/auto/quick/qmltests/data/tst_inputMethod.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_javaScriptDialogs.qml b/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml
index a521ea0d6..a521ea0d6 100644
--- a/tests/auto/quick/qmltests2/data/tst_javaScriptDialogs.qml
+++ b/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_linkHovered.qml b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
index faf943c55..faf943c55 100644
--- a/tests/auto/quick/qmltests2/data/tst_linkHovered.qml
+++ b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml
index db412f252..db412f252 100644
--- a/tests/auto/quick/qmltests2/data/tst_loadFail.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml
diff --git a/tests/auto/quick/qmltests2/data/tst_mouseClick.qml b/tests/auto/quick/qmltests/data/tst_mouseClick.qml
index eaa012f86..eaa012f86 100644
--- a/tests/auto/quick/qmltests2/data/tst_mouseClick.qml
+++ b/tests/auto/quick/qmltests/data/tst_mouseClick.qml
diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml
index f4fcc30ab..4d0bd28bf 100644
--- a/tests/auto/quick/qmltests/data/tst_userScripts.qml
+++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml
@@ -31,32 +31,33 @@ import QtTest 1.0
import QtWebEngine 1.2
Item {
- WebEngineScript {
- id: changeDocumentTitleScript
- sourceUrl: Qt.resolvedUrl("change-document-title.js")
- injectionPoint: WebEngineScript.DocumentReady
+
+ function changeDocumentTitleScript() {
+ return { name: "changeDocumentTitleScript",
+ sourceUrl: Qt.resolvedUrl("change-document-title.js"),
+ injectionPoint: WebEngineScript.DocumentReady }
}
- WebEngineScript {
- id: appendDocumentTitleScript
- sourceUrl: Qt.resolvedUrl("append-document-title.js")
- injectionPoint: WebEngineScript.DocumentReady
+ function appendDocumentTitleScript() {
+ return { sourceUrl: Qt.resolvedUrl("append-document-title.js"),
+ injectionPoint: WebEngineScript.DocumentReady }
}
- WebEngineScript {
- id: bigUserScript
- sourceUrl: Qt.resolvedUrl("big-user-script.js")
- injectionPoint: WebEngineScript.DocumentReady
+ function bigUserScript() {
+ return { sourceUrl: Qt.resolvedUrl("big-user-script.js"),
+ injectionPoint: WebEngineScript.DocumentReady }
}
- WebEngineScript {
- id: scriptWithMetadata
- sourceUrl: Qt.resolvedUrl("script-with-metadata.js")
+ function scriptWithMetadata() {
+ var script = WebEngine.script()
+ script.sourceUrl = Qt.resolvedUrl("script-with-metadata.js")
+ return script
}
- WebEngineScript {
- id: scriptWithBadMatchMetadata
- sourceUrl: Qt.resolvedUrl("script-with-bad-match-metadata.js")
+ function scriptWithBadMatchMetadata() {
+ var script = WebEngine.script()
+ script.sourceUrl = Qt.resolvedUrl("script-with-bad-match-metadata.js")
+ return script
}
TestWebEngineView {
@@ -79,21 +80,22 @@ Item {
onNavigationRequested: {
var urlString = request.url.toString();
if (urlString.indexOf("test1.html") !== -1)
- userScripts = [ changeDocumentTitleScript ];
+ userScripts.collection = [ changeDocumentTitleScript() ];
else if (urlString.indexOf("test2.html") !== -1)
- userScripts = [ appendDocumentTitleScript ];
+ userScripts.collection = [ appendDocumentTitleScript() ];
else
- userScripts = [];
+ userScripts.collection = [];
}
}
TestCase {
name: "WebEngineViewUserScripts"
+
function init() {
webEngineView.url = "";
- webEngineView.userScripts = [];
- webEngineView.profile.userScripts = [];
+ webEngineView.userScripts.collection = [];
+ webEngineView.profile.userScripts.collection = [];
}
function test_oneScript() {
@@ -101,7 +103,8 @@ Item {
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "Test page 1");
- webEngineView.userScripts = [ changeDocumentTitleScript ];
+ webEngineView.userScripts.collection = [ changeDocumentTitleScript() ]
+
compare(webEngineView.title, "Test page 1");
webEngineView.reload();
@@ -112,7 +115,7 @@ Item {
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "New title");
- webEngineView.userScripts = [];
+ webEngineView.userScripts.collection = [];
compare(webEngineView.title, "New title");
webEngineView.reload();
@@ -124,23 +127,25 @@ Item {
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "Test page 1");
-
- webEngineView.userScripts = [ changeDocumentTitleScript, appendDocumentTitleScript ];
+ var script1 = changeDocumentTitleScript();
+ var script2 = appendDocumentTitleScript();
+ script2.injectionPoint = WebEngineScript.Deferred;
+ webEngineView.userScripts.collection = [ script1, script2 ];
// Make sure the scripts are loaded in order.
- appendDocumentTitleScript.injectionPoint = WebEngineScript.Deferred
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "New title with appendix");
- appendDocumentTitleScript.injectionPoint = WebEngineScript.DocumentReady
- changeDocumentTitleScript.injectionPoint = WebEngineScript.Deferred
+ script2.injectionPoint = WebEngineScript.DocumentReady
+ script1.injectionPoint = WebEngineScript.Deferred
+ webEngineView.userScripts.collection = [ script1, script2 ];
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "New title");
// Make sure we can remove scripts from the preload list.
- webEngineView.userScripts = [ appendDocumentTitleScript ];
+ webEngineView.userScripts.collection = [ script2 ];
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "Test page 1 with appendix");
@@ -163,17 +168,18 @@ Item {
}
function test_bigScript() {
- webEngineView.userScripts = [ bigUserScript ];
+ webEngineView.userScripts.collection = [ bigUserScript() ];
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView , "title", "Big user script changed title");
}
function test_parseMetadataHeader() {
- compare(scriptWithMetadata.name, "Test script");
- compare(scriptWithMetadata.injectionPoint, WebEngineScript.DocumentReady);
+ var script = scriptWithMetadata()
+ compare(script.name, "Test script");
+ compare(script.injectionPoint, WebEngineScript.DocumentReady);
- webEngineView.userScripts = [ scriptWithMetadata ];
+ webEngineView.userScripts.collection = [ script ];
// @include *data/test*.html
webEngineView.url = Qt.resolvedUrl("test1.html");
@@ -197,10 +203,11 @@ Item {
}
function test_dontInjectBadUrlPatternsEverywhere() {
- compare(scriptWithBadMatchMetadata.name, "Test bad match script");
- compare(scriptWithBadMatchMetadata.injectionPoint, WebEngineScript.DocumentReady);
+ var script = scriptWithBadMatchMetadata();
+ compare(script.name, "Test bad match script");
+ compare(script.injectionPoint, WebEngineScript.DocumentReady);
- webEngineView.userScripts = [ scriptWithBadMatchMetadata ];
+ webEngineView.userScripts.collection = [ script ];
// @match some:junk
webEngineView.url = Qt.resolvedUrl("test2.html");
@@ -209,7 +216,7 @@ Item {
}
function test_profileWideScript() {
- webEngineView.profile.userScripts = [ changeDocumentTitleScript ];
+ webEngineView.profile.userScripts.collection = [ changeDocumentTitleScript() ];
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
diff --git a/tests/auto/quick/qmltests2/data/tst_viewSoure.qml b/tests/auto/quick/qmltests/data/tst_viewSoure.qml
index 04b40f544..997582335 100644
--- a/tests/auto/quick/qmltests2/data/tst_viewSoure.qml
+++ b/tests/auto/quick/qmltests/data/tst_viewSoure.qml
@@ -92,7 +92,7 @@ TestWebEngineView {
function test_viewSourceURL_data() {
var testLocalUrl = "view-source:" + Qt.resolvedUrl("test1.html");
- var testLocalUrlWithoutScheme = "view-source:" + Qt.resolvedUrl("test1.html").substring(7);
+ var testLocalUrlWithoutScheme = "view-source:" + Qt.resolvedUrl("test1.html").toString().substring(7);
return [
{ tag: "view-source:", userInputUrl: "view-source:", loadSucceed: true, url: "view-source:", title: "view-source:" },
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml
index 4ba3be4b9..4ba3be4b9 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml
index 9933fc2f7..9933fc2f7 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml
index 745f533f5..745f533f5 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml
index 36efa7680..36efa7680 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml
index e61f4c230..e61f4c230 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml
index 7c5b16eab..7c5b16eab 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/qmldir b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir
index cf8ac0512..cf8ac0512 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/QtWebEngine/Controls1Delegates/qmldir
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir
diff --git a/tests/auto/quick/qmltests2/mock-delegates/TestParams/FilePickerParams.qml b/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
index 02b0da1d4..02b0da1d4 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/TestParams/FilePickerParams.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/TestParams/JSDialogParams.qml b/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
index 70696803c..70696803c 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/TestParams/JSDialogParams.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
diff --git a/tests/auto/quick/qmltests2/mock-delegates/TestParams/qmldir b/tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir
index 5807f1e6e..5807f1e6e 100644
--- a/tests/auto/quick/qmltests2/mock-delegates/TestParams/qmldir
+++ b/tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir
diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro
index a50bfd7e6..5b2ea5d01 100644
--- a/tests/auto/quick/qmltests/qmltests.pro
+++ b/tests/auto/quick/qmltests/qmltests.pro
@@ -1,18 +1,110 @@
+include($$QTWEBENGINE_OUT_ROOT/src/webengine/qtwebengine-config.pri) # workaround for QTBUG-68093
+QT_FOR_CONFIG += webengine-private
+
include(../tests.pri)
-include(../../shared/http.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_desktopBehaviorLoadHtml.qml \
+ $$PWD/data/tst_findText.qml \
+ $$PWD/data/tst_focusOnNavigation.qml \
+ $$PWD/data/tst_geopermission.qml \
+ $$PWD/data/tst_getUserMedia.qml \
+ $$PWD/data/tst_keyboardEvents.qml \
+ $$PWD/data/tst_keyboardModifierMapping.qml \
+ $$PWD/data/tst_loadHtml.qml \
+ $$PWD/data/tst_loadProgress.qml \
+ $$PWD/data/tst_loadRecursionCrash.qml \
+ $$PWD/data/tst_loadUrl.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)
+}
+
+qtConfig(webengine-testsupport) {
+ QML_TESTS += \
+ $$PWD/data/tst_favicon.qml \
+ $$PWD/data/tst_faviconDownload.qml \
+ $$PWD/data/tst_inputMethod.qml \
+ $$PWD/data/tst_linkHovered.qml \
+ $$PWD/data/tst_loadFail.qml \
+ $$PWD/data/tst_mouseClick.qml \
+ $$PWD/data/tst_viewSoure.qml
+ qtHaveModule(quickcontrols): QML_TESTS += $$PWD/data/tst_javaScriptDialogs.qml
+} else {
+ PLUGIN_EXTENSION = .so
+ PLUGIN_PREFIX = lib
+ macos: PLUGIN_PREFIX = .dylib
+ win32 {
+ PLUGIN_EXTENSION = .dll
+ PLUGIN_PREFIX =
+ }
+
+ TESTSUPPORT_MODULE = $$shell_path($$[QT_INSTALL_QML]/QtWebEngine/testsupport/$${PLUGIN_PREFIX}qtwebenginetestsupportplugin$${PLUGIN_EXTENSION})
+ BUILD_DIR = $$shell_path($$clean_path($$OUT_PWD/../../../..))
+ SRC_DIR = $$shell_path($$clean_path($$PWD/../../../..))
+
+ warning("QML Test Support API is disabled. This means some QML tests that use Test Support API will fail.")
+ warning("Use the following command to build Test Support module and rebuild WebEngineView API:")
+ warning("cd $$BUILD_DIR && qmake -r $$shell_path($$SRC_DIR/qtwebengine.pro -- --feature-testsupport=yes) && make -C $$shell_path($$BUILD_DIR/src/webengine) clean && make")
+ warning("After performing the command above make sure QML module \"QtWebEngine.testsupport\" is deployed at $$TESTSUPPORT_MODULE")
+}
+
+qtHaveModule(quickcontrols) {
+ QML_TESTS += \
+ $$PWD/data/tst_contextMenu.qml \
+ $$PWD/data/tst_download.qml \
+ $$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 \
@@ -30,40 +122,35 @@ OTHER_FILES += \
$$PWD/data/keyboardModifierMapping.html \
$$PWD/data/keyboardEvents.html \
$$PWD/data/titleupdate.js \
- $$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_filePicker.qml \
- $$PWD/data/tst_findText.qml \
- $$PWD/data/tst_focusOnNavigation.qml \
- $$PWD/data/tst_geopermission.qml \
- $$PWD/data/tst_getUserMedia.qml \
- $$PWD/data/tst_loadHtml.qml \
- $$PWD/data/tst_loadProgress.qml \
- $$PWD/data/tst_loadRecursionCrash.qml \
- $$PWD/data/tst_loadUrl.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_titleChanged.qml \
- $$PWD/data/tst_unhandledKeyEventPropagation.qml \
- $$PWD/data/tst_userScripts.qml \
- $$PWD/data/tst_viewSource.qml \
- $$PWD/data/tst_webchannel.qml \
- $$PWD/data/tst_settings.qml \
- $$PWD/data/tst_keyboardModifierMapping.qml \
- $$PWD/data/tst_keyboardEvents.qml \
- $$PWD/data/webchannel-test.html \
$$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/QtWebEngine/Controls1Delegates/AlertDialog.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml \
+ $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/qmldir \
+ $$PWD/mock-delegates/TestParams/FilePickerParams.qml \
+ $$PWD/mock-delegates/TestParams/JSDialogParams.qml \
+ $$PWD/mock-delegates/TestParams/qmldir
+
+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)
-DEFINES += QUICK_TEST_SOURCE_DIR=\\\"$$re_escape($$PWD$${QMAKE_DIR_SEP}data)\\\"
+
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 5677f9047..8423df1bd 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -28,6 +28,10 @@
#include <httpserver.h>
+#if QT_CONFIG(ssl)
+#include <httpsserver.h>
+#endif
+
#include <QtCore/QScopedPointer>
#include <QTemporaryDir>
#include <QtQuickTest/quicktest.h>
@@ -130,7 +134,7 @@ int main(int argc, char **argv)
QLocale::setDefault(QLocale("en"));
static QByteArrayList params = {QByteArrayLiteral("--use-fake-device-for-media-stream")};
- QVector<const char *> w_argv(argc); \
+ 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) \
@@ -151,6 +155,12 @@ int main(int argc, char **argv)
return server;
});
+#if QT_CONFIG(ssl)
+ qmlRegisterSingletonType<HttpsServer>(
+ "Test.Shared", 1, 0, "HttpsServer",
+ [&](QQmlEngine *, QJSEngine *) { return new HttpsServer; });
+#endif
+
int i = quick_test_main(argc, argv, "qmltests", QUICK_TEST_SOURCE_DIR);
return i;
}
diff --git a/tests/auto/quick/qmltests2/data/favicon.html b/tests/auto/quick/qmltests2/data/favicon.html
deleted file mode 100644
index e1b84a9cc..000000000
--- a/tests/auto/quick/qmltests2/data/favicon.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<link type="image/png" href="icons/favicon.png" sizes="48x48" rel="icon" />
-</head>
-<body>
-<p>It's expected that you see a favicon displayed for this page when you open it as a local file.</p>
-<p>The favicon looks like this:</p>
-<img id='image' src="icons/favicon.png"/>
-</body>
-</html>
diff --git a/tests/auto/quick/qmltests2/data/icons/favicon.png b/tests/auto/quick/qmltests2/data/icons/favicon.png
deleted file mode 100644
index 35717cca5..000000000
--- a/tests/auto/quick/qmltests2/data/icons/favicon.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/quick/qmltests2/data/test1.html b/tests/auto/quick/qmltests2/data/test1.html
deleted file mode 100644
index 5c09f06ed..000000000
--- a/tests/auto/quick/qmltests2/data/test1.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-<head><title>Test page 1</title></head>
-<body>
-Hello.
-</body>
-</html>
diff --git a/tests/auto/quick/qmltests2/data/test2.html b/tests/auto/quick/qmltests2/data/test2.html
deleted file mode 100644
index 629c2a063..000000000
--- a/tests/auto/quick/qmltests2/data/test2.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-<head><title>Test page with huge link area</title></head>
-<body>
-<a title="A title" href="test1.html"><img width=200 height=200></a>
-</body>
-</html>
diff --git a/tests/auto/quick/qmltests2/qmltests2.pro b/tests/auto/quick/qmltests2/qmltests2.pro
deleted file mode 100644
index 98e33972b..000000000
--- a/tests/auto/quick/qmltests2/qmltests2.pro
+++ /dev/null
@@ -1,79 +0,0 @@
-include(../tests.pri)
-
-QT += qmltest
-
-IMPORTPATH += $$PWD/data
-
-OTHER_FILES += \
- $$PWD/data/accepttypes.html \
- $$PWD/data/alert.html \
- $$PWD/data/confirm.html \
- $$PWD/data/confirmclose.html \
- $$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/multifileupload.html \
- $$PWD/data/prompt.html \
- $$PWD/data/singlefileupload.html \
- $$PWD/data/test1.html \
- $$PWD/data/test2.html \
- $$PWD/data/titleupdate.js \
- $$PWD/data/tst_favicon.qml \
- $$PWD/data/tst_faviconDownload.qml \
- $$PWD/data/tst_inputMethod.qml \
- $$PWD/data/tst_javaScriptDialogs.qml \
- $$PWD/data/tst_linkHovered.qml \
- $$PWD/data/tst_loadFail.qml \
- $$PWD/data/tst_mouseClick.qml \
- $$PWD/data/tst_viewSource.qml \
- $$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/QtWebEngine/Controls1Delegates/AlertDialog.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/Menu.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/MenuItem.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml \
- $$PWD/mock-delegates/QtWebEngine/Controls1Delegates/qmldir \
- $$PWD/mock-delegates/TestParams/FilePickerParams.qml \
- $$PWD/mock-delegates/TestParams/JSDialogParams.qml \
- $$PWD/mock-delegates/TestParams/qmldir \
-
-load(qt_build_paths)
-DEFINES += QUICK_TEST_SOURCE_DIR=\\\"$$re_escape($$PWD$${QMAKE_DIR_SEP}data)\\\"
-
-!qtConfig(webengine-testsupport) {
- PLUGIN_EXTENSION = .so
- PLUGIN_PREFIX = lib
- osx: PLUGIN_PREFIX = .dylib
- win32 {
- PLUGIN_EXTENSION = .dll
- PLUGIN_PREFIX =
- }
-
- TESTSUPPORT_MODULE = $$shell_path($$[QT_INSTALL_QML]/QtWebEngine/testsupport/$${PLUGIN_PREFIX}qtwebenginetestsupportplugin$${PLUGIN_EXTENSION})
- BUILD_DIR = $$shell_path($$clean_path($$OUT_PWD/../../../..))
- SRC_DIR = $$shell_path($$clean_path($$PWD/../../../..))
-
- warning("QML Test Support API is disabled. This means some QML tests that use Test Support API will fail.")
- warning("Use the following command to build Test Support module and rebuild WebEngineView API:")
- warning("cd $$BUILD_DIR && qmake -r $$shell_path($$SRC_DIR/qtwebengine.pro -- --feature-testsupport=yes) && make -C $$shell_path($$BUILD_DIR/src/webengine) clean && make")
- warning("After performing the command above make sure QML module \"QtWebEngine.testsupport\" is deployed at $$TESTSUPPORT_MODULE")
-}
diff --git a/tests/auto/quick/qmltests2/tst_qmltests2.cpp b/tests/auto/quick/qmltests2/tst_qmltests2.cpp
deleted file mode 100644
index 8c81ed7f5..000000000
--- a/tests/auto/quick/qmltests2/tst_qmltests2.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-#include <QtCore/QScopedPointer>
-#include <QtQuickTest/quicktest.h>
-#include <QtWebEngine/QQuickWebEngineProfile>
-#include "qt_webengine_quicktest.h"
-
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
-#include <fcntl.h>
-#include <signal.h>
-#include <unistd.h>
-#endif
-
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
-static bool debuggerPresent()
-{
- int fd = open("/proc/self/status", O_RDONLY);
- if (fd == -1)
- return false;
- char buffer[2048];
- ssize_t size = read(fd, buffer, sizeof(buffer) - 1);
- if (size == -1) {
- close(fd);
- return false;
- }
- buffer[size] = 0;
- const char tracerPidToken[] = "\nTracerPid:";
- char *tracerPid = strstr(buffer, tracerPidToken);
- if (!tracerPid) {
- close(fd);
- return false;
- }
- tracerPid += sizeof(tracerPidToken);
- long int pid = strtol(tracerPid, &tracerPid, 10);
- close(fd);
- return pid != 0;
-}
-
-static void stackTrace()
-{
- bool ok = false;
- const int disableStackDump = qEnvironmentVariableIntValue("QTEST_DISABLE_STACK_DUMP", &ok);
- if (ok && disableStackDump == 1)
- return;
-
- if (debuggerPresent())
- return;
-
- fprintf(stderr, "\n========= Received signal, dumping stack ==============\n");
- char cmd[512];
- qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n"
- "set prompt\n"
- "set height 0\n"
- "thread apply all where full\n"
- "detach\n"
- "quit\n"
- "EOF\n",
- (int)getpid());
-
- if (system(cmd) == -1)
- fprintf(stderr, "calling gdb failed\n");
- fprintf(stderr, "========= End of stack trace ==============\n");
-}
-
-static void sigSegvHandler(int signum)
-{
- stackTrace();
- qFatal("Received signal %d", signum);
-}
-#endif
-
-int main(int argc, char **argv)
-{
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
- struct sigaction sigAction;
-
- sigemptyset(&sigAction.sa_mask);
- sigAction.sa_handler = &sigSegvHandler;
- sigAction.sa_flags = 0;
-
- sigaction(SIGSEGV, &sigAction, 0);
-#endif
-
- // Inject the mock ui delegates module
- qputenv("QML2_IMPORT_PATH", QByteArray(TESTS_SOURCE_DIR "qmltests2/mock-delegates"));
- QScopedPointer<Application> app;
-
- // Force to use English language for testing due to error message checks
- QLocale::setDefault(QLocale("en"));
-
- if (!QCoreApplication::instance()) {
- app.reset(new Application(argc, argv));
- }
- QtWebEngine::initialize();
- QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
-
- QTEST_SET_MAIN_SOURCE_PATH
-
- int i = quick_test_main(argc, argv, "qmltests2", QUICK_TEST_SOURCE_DIR);
- return i;
-}
diff --git a/tests/auto/quick/qmltests_ssl/data/TestWebEngineView.qml b/tests/auto/quick/qmltests_ssl/data/TestWebEngineView.qml
deleted file mode 100644
index 6db076ae8..000000000
--- a/tests/auto/quick/qmltests_ssl/data/TestWebEngineView.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtTest 1.1
-import QtWebEngine 1.7
-
-WebEngineView {
- property var loadStatus: null
- property bool windowCloseRequestedSignalEmitted: false
- settings.focusOnNavigationEnabled: true
-
- function waitForLoadSucceeded(timeout) {
- var success = _waitFor(function() { return loadStatus == WebEngineView.LoadSucceededStatus }, timeout)
- loadStatus = null
- return success
- }
- function waitForLoadFailed(timeout) {
- var failure = _waitFor(function() { return loadStatus == WebEngineView.LoadFailedStatus }, timeout)
- loadStatus = null
- return failure
- }
- function waitForLoadStopped(timeout) {
- var stop = _waitFor(function() { return loadStatus == WebEngineView.LoadStoppedStatus }, timeout)
- loadStatus = null
- return stop
- }
- function waitForWindowCloseRequested() {
- return _waitFor(function() { return windowCloseRequestedSignalEmitted; });
- }
- function _waitFor(predicate, timeout) {
- if (timeout === undefined)
- timeout = 12000;
- var i = 0
- while (i < timeout && !predicate()) {
- testResult.wait(50)
- i += 50
- }
- return predicate()
- }
-
- function getActiveElementId() {
- var activeElementId;
- runJavaScript("document.activeElement.id", function(result) {
- activeElementId = result;
- });
- testCase.tryVerify(function() { return activeElementId != undefined });
- return activeElementId;
- }
-
- function verifyElementHasFocus(element) {
- testCase.tryVerify(function() { return getActiveElementId() == element; }, 5000,
- "Element \"" + element + "\" has focus");
- }
-
- function setFocusToElement(element) {
- runJavaScript("document.getElementById('" + element + "').focus()");
- verifyElementHasFocus(element);
- }
-
- function getElementCenter(element) {
- var center;
- runJavaScript("(function() {" +
- " var elem = document.getElementById('" + element + "');" +
- " var rect = elem.getBoundingClientRect();" +
- " return { 'x': (rect.left + rect.right) / 2, 'y': (rect.top + rect.bottom) / 2 };" +
- "})();", function(result) { center = result } );
- testCase.tryVerify(function() { return center !== undefined; });
- return center;
- }
-
- function getTextSelection() {
- var textSelection;
- runJavaScript("window.getSelection().toString()", function(result) { textSelection = result });
- testCase.tryVerify(function() { return textSelection !== undefined; });
- return textSelection;
- }
-
- TestResult { id: testResult }
- TestCase { id: testCase }
-
- onLoadingChanged: {
- loadStatus = loadRequest.status
- }
-
- onWindowCloseRequested: {
- windowCloseRequestedSignalEmitted = true;
- }
-
- function getBodyText() {
- let text
- runJavaScript('document.body.innerText', function(t) { text = t })
- testCase.tryVerify(function() { return text !== undefined })
- return text
- }
-}
-
diff --git a/tests/auto/quick/qmltests_ssl/qmltests_ssl.pro b/tests/auto/quick/qmltests_ssl/qmltests_ssl.pro
deleted file mode 100644
index a8325e497..000000000
--- a/tests/auto/quick/qmltests_ssl/qmltests_ssl.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-include(../tests.pri)
-include(../../shared/https.pri)
-QT += qmltest
-
-IMPORTPATH += $$PWD/data
-
-OTHER_FILES += $$PWD/data/tst_certificateError.qml
-
-load(qt_build_paths)
-DEFINES += QUICK_TEST_SOURCE_DIR=\\\"$$re_escape($$PWD$${QMAKE_DIR_SEP}data)\\\"
diff --git a/tests/auto/quick/qmltests_ssl/tst_qmltests_ssl.cpp b/tests/auto/quick/qmltests_ssl/tst_qmltests_ssl.cpp
deleted file mode 100644
index 1f54ffd8e..000000000
--- a/tests/auto/quick/qmltests_ssl/tst_qmltests_ssl.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-#include <QtWebEngineCore/qtwebenginecoreglobal.h>
-#include <QtNetwork/qtnetwork-config.h>
-
-#if QT_CONFIG(ssl)
-#include <httpsserver.h>
-#endif
-
-#include <QtCore/QScopedPointer>
-#include <QTemporaryDir>
-#include <QtQuickTest/quicktest.h>
-#include <QtWebEngine/QQuickWebEngineProfile>
-#include <QQmlEngine>
-#include "qt_webengine_quicktest.h"
-
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
-#include <fcntl.h>
-#include <signal.h>
-#include <unistd.h>
-#endif
-
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
-static bool debuggerPresent()
-{
- int fd = open("/proc/self/status", O_RDONLY);
- if (fd == -1)
- return false;
- char buffer[2048];
- ssize_t size = read(fd, buffer, sizeof(buffer) - 1);
- if (size == -1) {
- close(fd);
- return false;
- }
- buffer[size] = 0;
- const char tracerPidToken[] = "\nTracerPid:";
- char *tracerPid = strstr(buffer, tracerPidToken);
- if (!tracerPid) {
- close(fd);
- return false;
- }
- tracerPid += sizeof(tracerPidToken);
- long int pid = strtol(tracerPid, &tracerPid, 10);
- close(fd);
- return pid != 0;
-}
-
-static void stackTrace()
-{
- bool ok = false;
- const int disableStackDump = qEnvironmentVariableIntValue("QTEST_DISABLE_STACK_DUMP", &ok);
- if (ok && disableStackDump == 1)
- return;
-
- if (debuggerPresent())
- return;
-
- fprintf(stderr, "\n========= Received signal, dumping stack ==============\n");
- char cmd[512];
- qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n"
- "set prompt\n"
- "set height 0\n"
- "thread apply all where full\n"
- "detach\n"
- "quit\n"
- "EOF\n",
- (int)getpid());
-
- if (system(cmd) == -1)
- fprintf(stderr, "calling gdb failed\n");
- fprintf(stderr, "========= End of stack trace ==============\n");
-}
-
-static void sigSegvHandler(int signum)
-{
- stackTrace();
- qFatal("Received signal %d", signum);
-}
-#endif
-
-class TempDir : public QObject {
- Q_OBJECT
-
-public:
- Q_INVOKABLE QString path() {
- Q_ASSERT(tempDir.isValid());
- return tempDir.isValid() ? tempDir.path() : QString();
- }
-
-private:
- QTemporaryDir tempDir;
-};
-
-int main(int argc, char **argv)
-{
-#if defined(Q_OS_LINUX) && defined(QT_DEBUG)
- struct sigaction sigAction;
-
- sigemptyset(&sigAction.sa_mask);
- sigAction.sa_handler = &sigSegvHandler;
- sigAction.sa_flags = 0;
-
- sigaction(SIGSEGV, &sigAction, 0);
-#endif
-
- QScopedPointer<Application> app;
-
- // Force to use English language for testing due to error message checks
- QLocale::setDefault(QLocale("en"));
-
- static QByteArrayList params = {QByteArrayLiteral("--use-fake-device-for-media-stream")};
- QVector<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(); \
-
- if (!QCoreApplication::instance()) {
- app.reset(new Application(w_argc, const_cast<char **>(w_argv.data())));
- }
- QtWebEngine::initialize();
- QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
- qmlRegisterType<TempDir>("Test.util", 1, 0, "TempDir");
-
- QTEST_SET_MAIN_SOURCE_PATH
-#if QT_CONFIG(ssl)
- qmlRegisterSingletonType<HttpsServer>("Test.Shared", 1, 0, "HttpsServer", [&] (QQmlEngine *, QJSEngine *) { return new HttpsServer; });
-#endif
- int i = quick_test_main(argc, argv, "qmltests", QUICK_TEST_SOURCE_DIR);
- return i;
-}
-
-#include "tst_qmltests_ssl.moc"
diff --git a/tests/auto/quick/qquickwebengineview/BLACKLIST b/tests/auto/quick/qquickwebengineview/BLACKLIST
new file mode 100644
index 000000000..d4a35a76a
--- /dev/null
+++ b/tests/auto/quick/qquickwebengineview/BLACKLIST
@@ -0,0 +1,2 @@
+[javascriptClipboard]
+ubuntu-20.04
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 09998eaca..01fabaf5a 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -38,6 +38,7 @@
#include <QtQml/QQmlEngine>
#include <QtTest/QtTest>
#include <QtWebEngine/QQuickWebEngineProfile>
+#include <QtWebEngine/QQuickWebEngineScriptCollection>
#include <QtGui/private/qinputmethod_p.h>
#include <QtWebEngine/private/qquickwebengineview_p.h>
#include <QtWebEngine/private/qquickwebenginesettings_p.h>
@@ -584,7 +585,7 @@ void tst_QQuickWebEngineView::interruptImeTextComposition()
QTest::mouseClick(view->window(), Qt::LeftButton, {}, textInputCenter);
} else if (eventType == "Touch") {
QPoint textInputCenter = elementCenter(view, QStringLiteral("input2"));
- QTouchDevice *touchDevice = QTest::createTouchDevice();
+ QPointingDevice *touchDevice = QTest::createTouchDevice();
QTest::touchEvent(view->window(), touchDevice).press(0, textInputCenter, view->window());
QTest::touchEvent(view->window(), touchDevice).release(0, textInputCenter, view->window());
}
@@ -770,9 +771,13 @@ void tst_QQuickWebEngineView::inputMethodHints()
QTRY_COMPARE(input->inputMethodQuery(Qt::ImSurroundingText).toString(), QString("a@b.com"));
QVERIFY(input->flags().testFlag(QQuickItem::ItemAcceptsInputMethod));
QVERIFY(view->flags().testFlag(QQuickItem::ItemAcceptsInputMethod));
- QInputMethodQueryEvent query(Qt::ImHints);
- QGuiApplication::sendEvent(input, &query);
- QTRY_COMPARE(Qt::InputMethodHints(query.value(Qt::ImHints).toUInt() & Qt::ImhExclusiveInputMask), Qt::ImhEmailCharactersOnly);
+ {
+ QInputMethodQueryEvent query(Qt::ImHints);
+ QGuiApplication::sendEvent(input, &query);
+ QTRY_COMPARE(
+ Qt::InputMethodHints(query.value(Qt::ImHints).toUInt() & Qt::ImhExclusiveInputMask),
+ Qt::ImhEmailCharactersOnly);
+ }
// The focus of an editable DIV is given directly to it, so no shadow root element
// is necessary. This tests the WebPage::editorState() method ability to get the
@@ -783,9 +788,13 @@ void tst_QQuickWebEngineView::inputMethodHints()
QTRY_COMPARE(input->inputMethodQuery(Qt::ImSurroundingText).toString(), QString("bla"));
QVERIFY(input->flags().testFlag(QQuickItem::ItemAcceptsInputMethod));
QVERIFY(view->flags().testFlag(QQuickItem::ItemAcceptsInputMethod));
- query = QInputMethodQueryEvent(Qt::ImHints);
- QGuiApplication::sendEvent(input, &query);
- QTRY_COMPARE(Qt::InputMethodHints(query.value(Qt::ImHints).toUInt()), Qt::ImhPreferLowercase | Qt::ImhNoPredictiveText | Qt::ImhMultiLine | Qt::ImhNoEditMenu | Qt::ImhNoTextHandles);
+ {
+ QInputMethodQueryEvent query(Qt::ImHints);
+ QGuiApplication::sendEvent(input, &query);
+ QTRY_COMPARE(Qt::InputMethodHints(query.value(Qt::ImHints).toUInt()),
+ Qt::ImhPreferLowercase | Qt::ImhNoPredictiveText | Qt::ImhMultiLine
+ | Qt::ImhNoEditMenu | Qt::ImhNoTextHandles);
+ }
}
void tst_QQuickWebEngineView::setZoomFactor()
@@ -875,6 +884,7 @@ public:
QQuickItem(parent), m_eventCounter(0), m_child(child) {
setFlag(ItemHasContents);
setAcceptedMouseButtons(Qt::AllButtons);
+ setAcceptTouchEvents(true);
setAcceptHoverEvents(true);
}
@@ -975,9 +985,7 @@ void tst_QQuickWebEngineView::inputEventForwardingDisabledWhenActiveFocusOnPress
QTest::mousePress(view->window(), Qt::LeftButton);
QTest::mouseRelease(view->window(), Qt::LeftButton);
- QTouchDevice *device = new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
+ QPointingDevice *device = QTest::createTouchDevice();
QTest::touchEvent(view->window(), device).press(0, QPoint(0,0), view->window());
QTest::touchEvent(view->window(), device).move(0, QPoint(1, 1), view->window());
@@ -1049,10 +1057,10 @@ void tst_QQuickWebEngineView::userScripts()
QScopedPointer<QQuickWebEngineView> webEngineView2(newWebEngineView());
webEngineView2->setParentItem(m_window->contentItem());
- QQmlListReference list(webEngineView1->profile(), "userScripts");
- QQuickWebEngineScript script;
+ QQuickWebEngineScriptCollection *collection = webEngineView1->profile()->userScripts();
+ QWebEngineScript script;
script.setSourceCode("document.title = 'New title';");
- list.append(&script);
+ collection->insert(script);
webEngineView1->setUrl(urlFromTestPath("html/basic_page.html"));
QVERIFY(waitForLoadSucceeded(webEngineView1.data()));
@@ -1062,7 +1070,7 @@ void tst_QQuickWebEngineView::userScripts()
QVERIFY(waitForLoadSucceeded(webEngineView2.data()));
QTRY_COMPARE(webEngineView2->title(), QStringLiteral("New title"));
- list.clear();
+ collection->clear();
}
void tst_QQuickWebEngineView::javascriptClipboard_data()
@@ -1176,11 +1184,11 @@ void tst_QQuickWebEngineView::setProfile() {
void tst_QQuickWebEngineView::focusChild_data()
{
QTest::addColumn<QString>("interfaceName");
- QTest::addColumn<QVector<QAccessible::Role>>("ancestorRoles");
+ QTest::addColumn<QList<QAccessible::Role>>("ancestorRoles");
- QTest::newRow("QQuickWebEngineView") << QString("QQuickWebEngineView") << QVector<QAccessible::Role>({QAccessible::Client});
- QTest::newRow("RenderWidgetHostViewQtDelegate") << QString("RenderWidgetHostViewQtDelegate") << QVector<QAccessible::Role>({QAccessible::Client});
- QTest::newRow("QQuickView") << QString("QQuickView") << QVector<QAccessible::Role>({QAccessible::Window, QAccessible::Client /* view */});
+ QTest::newRow("QQuickWebEngineView") << QString("QQuickWebEngineView") << QList<QAccessible::Role>({QAccessible::Client});
+ QTest::newRow("RenderWidgetHostViewQtDelegate") << QString("RenderWidgetHostViewQtDelegate") << QList<QAccessible::Role>({QAccessible::Client});
+ QTest::newRow("QQuickView") << QString("QQuickView") << QList<QAccessible::Role>({QAccessible::Window, QAccessible::Client /* view */});
}
void tst_QQuickWebEngineView::focusChild()
@@ -1189,7 +1197,7 @@ void tst_QQuickWebEngineView::focusChild()
QSKIP("Requires newer base Qt");
#endif
auto traverseToWebDocumentAccessibleInterface = [](QAccessibleInterface *iface) -> QAccessibleInterface * {
- QFETCH(QVector<QAccessible::Role>, ancestorRoles);
+ QFETCH(QList<QAccessible::Role>, ancestorRoles);
for (int i = 0; i < ancestorRoles.size(); ++i) {
if (iface->childCount() == 0 || iface->role() != ancestorRoles[i])
return nullptr;
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index f02652ba1..4648b2f64 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -10,17 +10,11 @@ SUBDIRS += \
publicapi \
qquickwebenginedefaultsurfaceformat \
qquickwebengineview \
- qtbug-70248
+ qtbug-70248 \
+ certificateerror
qtConfig(webengine-testsupport) {
- SUBDIRS += \
- qmltests2 \
- qquickwebengineviewgraphics
+ SUBDIRS += qquickwebengineviewgraphics
}
-qtConfig(ssl): SUBDIRS += qmltests_ssl
-
-lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 14): SUBDIRS -= qmltests qmltests2 qmltests_ssl
-
-# QTBUG-66055
-boot2qt: SUBDIRS -= inspectorserver qquickwebengineview qmltests qmltests2
+boot2qt: SUBDIRS -= inspectorserver qquickwebengineview qmltests
diff --git a/tests/auto/quick/shared/util.h b/tests/auto/quick/shared/util.h
index b7b7b1564..132c353ca 100644
--- a/tests/auto/quick/shared/util.h
+++ b/tests/auto/quick/shared/util.h
@@ -173,7 +173,7 @@ int main(int argc, char *argv[]) \
{ \
QtWebEngine::initialize(); \
\
- QVector<const char *> w_argv(argc); \
+ 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) \