summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-09-15 10:06:39 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-17 05:20:52 +0000
commit5838af270052c8befe31f9ddcf29d02bb0a5084a (patch)
tree0ef04d021747d6e83df5bca96476596b54aff4db /tests/auto
parent310db2b8164fd2a8d9bed4bbf46faa674ff553cc (diff)
Fix qrc sources for QWebEngineScript
Fixes: QTBUG-96525 Change-Id: I39d6247c0dd0e55e4fb91b176f34e676eeabbcdd Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit ce2d6a94ce99f8d6f82fbcbf45603f8eb7a92957) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qmltests/data/tst_webchannel.qml6
-rw-r--r--tests/auto/quick/qmltests/data/webchannel-test.html1
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_webchannel.qml b/tests/auto/quick/qmltests/data/tst_webchannel.qml
index 70edc1bcd..82db70288 100644
--- a/tests/auto/quick/qmltests/data/tst_webchannel.qml
+++ b/tests/auto/quick/qmltests/data/tst_webchannel.qml
@@ -81,6 +81,12 @@ Item {
}
function test_basic() {
+ webView.userScripts.collection = [ {
+ name: "qtwebchanneljs",
+ sourceUrl: Qt.resolvedUrl("qrc:/qtwebchannel/qwebchannel.js"),
+ injectionPoint: WebEngineScript.DocumentCreation,
+ worldId: WebEngineScript.MainWorld
+ }]
webView.url = testUrl;
verify(webView.waitForLoadSucceeded());
diff --git a/tests/auto/quick/qmltests/data/webchannel-test.html b/tests/auto/quick/qmltests/data/webchannel-test.html
index 92966b24a..d8c3b1305 100644
--- a/tests/auto/quick/qmltests/data/webchannel-test.html
+++ b/tests/auto/quick/qmltests/data/webchannel-test.html
@@ -2,7 +2,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
<script type="text/javascript">
//BEGIN SETUP
var channel = new QWebChannel(qt.webChannelTransport, function(channel) {