summaryrefslogtreecommitdiff
path: root/tests/auto/webchannel/tst_webchannel.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:07:49 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 13:53:55 +0200
commit2dd6a5e7ff769e54065ae8b9b532b2e56f2e3116 (patch)
tree68c7020317d09116871014f1df6545d68ab7f328 /tests/auto/webchannel/tst_webchannel.cpp
parented4be1f75314ddc004ea7c0d7c6af715252e4e5c (diff)
parentf6b06b37fffdb35c8dd8a9b9cfd0177daae473be (diff)
downloadqtwebchannel-2dd6a5e7ff769e54065ae8b9b532b2e56f2e3116.tar.gz
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: Ibd56abaa0b9d9aac275be41209ba2db3fc79e212
Diffstat (limited to 'tests/auto/webchannel/tst_webchannel.cpp')
-rw-r--r--tests/auto/webchannel/tst_webchannel.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/webchannel/tst_webchannel.cpp b/tests/auto/webchannel/tst_webchannel.cpp
index 24d473f..2e80477 100644
--- a/tests/auto/webchannel/tst_webchannel.cpp
+++ b/tests/auto/webchannel/tst_webchannel.cpp
@@ -312,6 +312,21 @@ void TestWebChannel::testDeregisterObjects()
emit testObject.sig1();
}
+void TestWebChannel::testDeregisterObjectAtStart()
+{
+ QWebChannel channel;
+ QVERIFY(channel.registeredObjects().isEmpty());
+
+ TestObject testObject;
+ testObject.setObjectName("myTestObject");
+
+ channel.registerObject(testObject.objectName(), &testObject);
+ QCOMPARE(channel.registeredObjects().size(), 1);
+
+ channel.deregisterObject(&testObject);
+ QVERIFY(channel.registeredObjects().isEmpty());
+}
+
void TestWebChannel::testInfoForObject()
{
TestObject obj;