summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginescript
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-05-09 15:58:07 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-05-17 09:56:45 +0000
commitcd1af11a3a7fc41afa2f628b967344fd92f02a6f (patch)
tree70ccdc8837e7f151a5858bfad4d69d05b7e4381a /tests/auto/widgets/qwebenginescript
parentbd3687d2c5cc78e7571406471689b2d0fafbb1bf (diff)
Remove qwebchannel.js from test and example
Use qwebchannel.js shipped with qtwebchannel. Change-Id: Iceead5131d22a6988bbb4e7a3cca1e9f21908e3e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebenginescript')
-rw-r--r--tests/auto/widgets/qwebenginescript/resources/webChannelWithBadString.html2
-rw-r--r--tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/widgets/qwebenginescript/resources/webChannelWithBadString.html b/tests/auto/widgets/qwebenginescript/resources/webChannelWithBadString.html
index af40f6a2b..ca2bc0f27 100644
--- a/tests/auto/widgets/qwebenginescript/resources/webChannelWithBadString.html
+++ b/tests/auto/widgets/qwebenginescript/resources/webChannelWithBadString.html
@@ -4,7 +4,7 @@
<title>webChannelWithBadString</title>
</head>
<body>
- <script src="/qwebchannel.js"></script>
+ <script src="qrc:/qtwebchannel/qwebchannel.js"></script>
<script type="text/javascript">
new QWebChannel(qt.webChannelTransport, (channel) => {
channel.objects.host.text = String.fromCharCode(0xD800);
diff --git a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
index a9efabf97..23d31a478 100644
--- a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
+++ b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
@@ -264,9 +264,8 @@ static QString readFile(const QString &path)
static QWebEngineScript webChannelScript()
{
- QString sourceCode = readFile(QStringLiteral(":/qwebchannel.js"));
- if (sourceCode.isEmpty())
- return {};
+ QString sourceCode = readFile(QStringLiteral(":/qtwebchannel/qwebchannel.js"));
+ Q_ASSERT(!sourceCode.isEmpty());
QWebEngineScript script;
script.setSourceCode(sourceCode);