summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/data/webchannel-test.html
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@digia.com>2014-08-14 02:21:56 +0800
committerPierre Rossi <pierre.rossi@theqtcompany.com>2015-02-12 08:07:29 +0000
commiteee482929a81ae9d685a0ee140733227ceac6543 (patch)
treea31842bbe485e6c32bb59538d4de11656c1cbbe8 /tests/auto/quick/qmltests/data/webchannel-test.html
parentacce2537cf8781e7efbb17183a6b54c211e37b19 (diff)
Integrate with WebChannel
Provide a transport mechanism for WebChannel over chromium IPC and expose WebChannel in our experimental QML API. Co-authored by Milian Wolff. Change-Id: Ia24b1d4ebc8515de677d4849ec33cb55c963918e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qmltests/data/webchannel-test.html')
-rw-r--r--tests/auto/quick/qmltests/data/webchannel-test.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/webchannel-test.html b/tests/auto/quick/qmltests/data/webchannel-test.html
new file mode 100644
index 000000000..940821209
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/webchannel-test.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<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(navigator.qtWebChannelTransport, function(channel) {
+ window.testObject = channel.objects.testObject;
+ testObject.runTest.connect(function(foo) {
+ testObject.foo = foo;
+ testObject.bar(foo);
+ });
+ testObject.clientInitialized(testObject.foo);
+ });
+ //END SETUP
+ </script>
+ </head>
+ <body>
+ </body>
+</html>