summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-08-01 15:04:35 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-08-09 09:39:56 +0000
commitdb62139e1daea171e08d95592c63f663789d6391 (patch)
treeddce513a2e74bf656466a6f83b57a8efbd3cbe18 /tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
parente50fb187dc4467ac28a724e6ea9f2d51a1f131ba (diff)
Make WebChannel an optional feature
Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 4ce971c4b..95a46fbc2 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -20,6 +20,7 @@
*/
#include "../util.h"
+#include <QtWebEngineCore/qtwebenginecore-config.h>
#include <QByteArray>
#include <QClipboard>
#include <QDir>
@@ -39,7 +40,9 @@
#include <QtGui/QClipboard>
#include <QtTest/QtTest>
#include <QTextCharFormat>
+#if QT_CONFIG(webengine_webchannel)
#include <QWebChannel>
+#endif
#include <httpserver.h>
#include <qnetworkcookiejar.h>
#include <qnetworkreply.h>
@@ -200,8 +203,9 @@ private Q_SLOTS:
void loadInSignalHandlers_data();
void loadInSignalHandlers();
void loadFromQrc();
-
+#if QT_CONFIG(webengine_webchannel)
void restoreHistory();
+#endif
void toPlainTextLoadFinishedRace_data();
void toPlainTextLoadFinishedRace();
void setZoomFactor();
@@ -3950,6 +3954,7 @@ void tst_QWebEnginePage::loadFromQrc()
QCOMPARE(spy.takeFirst().value(0).toBool(), false);
}
+#if QT_CONFIG(webengine_webchannel)
void tst_QWebEnginePage::restoreHistory()
{
QWebChannel channel;
@@ -3977,6 +3982,7 @@ void tst_QWebEnginePage::restoreHistory()
QCOMPARE(page.webChannel(), &channel);
QVERIFY(page.scripts().contains(script));
}
+#endif
void tst_QWebEnginePage::toPlainTextLoadFinishedRace_data()
{