summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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()