summaryrefslogtreecommitdiff
path: root/tests/auto/webchannel/tst_webchannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/webchannel/tst_webchannel.cpp')
-rw-r--r--tests/auto/webchannel/tst_webchannel.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/webchannel/tst_webchannel.cpp b/tests/auto/webchannel/tst_webchannel.cpp
index e46d097..57aab53 100644
--- a/tests/auto/webchannel/tst_webchannel.cpp
+++ b/tests/auto/webchannel/tst_webchannel.cpp
@@ -799,6 +799,22 @@ void TestWebChannel::testWrapValues()
}
}
+void TestWebChannel::testWrapObjectWithMultipleTransports()
+{
+ QWebChannel channel;
+ QMetaObjectPublisher *pub = channel.d_func()->publisher;
+
+ DummyTransport *dummyTransport = new DummyTransport(this);
+ DummyTransport *dummyTransport2 = new DummyTransport(this);
+
+ TestObject obj;
+
+ pub->wrapResult(QVariant::fromValue(&obj), dummyTransport);
+ pub->wrapResult(QVariant::fromValue(&obj), dummyTransport2);
+
+ QCOMPARE(pub->transportedWrappedObjects.count(), 2);
+}
+
void TestWebChannel::testJsonToVariant()
{
QWebChannel channel;