summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2014-07-17 13:09:55 +0200
committerMilian Wolff <milian.wolff@kdab.com>2014-08-03 16:54:50 +0200
commit462d61dd29e4407005ccd679c417343cf5827726 (patch)
tree473acd2ecc3c1e2ad5ef41af10dc776338eb5e2f /tests
parentfcdda8f42c0148ce7af2db9d03bd3cec8cba55e0 (diff)
downloadqtwebchannel-462d61dd29e4407005ccd679c417343cf5827726.tar.gz
Enable the QML tests even when QtWebKit is not available.
The tests don't depend on QtWebKit anymore, so they should be run even without QtWebKit installed. Change-Id: Id60ebec861b29b73522fba670b1a0c19375cb826 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/qml/Client.qml8
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 4c998e9..308ac2b 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -2,6 +2,6 @@ TEMPLATE = subdirs
SUBDIRS += cmake webchannel
-qtHaveModule(webkit):qtHaveModule(quick) {
+qtHaveModule(quick) {
SUBDIRS += qml
}
diff --git a/tests/auto/qml/Client.qml b/tests/auto/qml/Client.qml
index fad1412..0b623a0 100644
--- a/tests/auto/qml/Client.qml
+++ b/tests/auto/qml/Client.qml
@@ -64,16 +64,19 @@ Item {
function send(message)
{
if (debug) {
- console.log("client posts message: ", message);
+ console.log("client posts message: ", message, "is idle:", webChannel.clientIsIdle());
}
clientMessages.push(message);
serverTransport.receiveMessage(message);
+ if (message && message.type && message.type === JSClient.QWebChannelMessageTypes.idle) {
+ verify(webChannel.clientIsIdle());
+ }
}
Component.onCompleted: {
serverTransport.sendMessageRequested.connect(function(message) {
if (debug) {
- console.log("client received message: ", message);
+ console.log("client received message: ", JSON.stringify(message));
}
if (onmessage) {
onmessage({data:message});
@@ -151,7 +154,6 @@ Item {
var msg = awaitMessage();
verify(msg);
compare(msg.type, JSClient.QWebChannelMessageTypes.idle);
- verify(webChannel.clientIsIdle())
}
function awaitMessageSkipIdle()