summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-06-05 16:27:13 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-06-05 16:27:13 +0100
commit926ddbefa79a5b660bbb170a056588a20e7b991a (patch)
tree55af5c593b5883859977861f3341560114417738
parent8ff2818f0e663c5db1d5d7819d13185397bc2b8b (diff)
text-respawn test: add a disappearing base channel testbase-channel-disappear
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--tests/dbus/text-respawn.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/dbus/text-respawn.c b/tests/dbus/text-respawn.c
index 1cc8113bc..46b99aa25 100644
--- a/tests/dbus/text-respawn.c
+++ b/tests/dbus/text-respawn.c
@@ -232,6 +232,29 @@ main (int argc,
g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
}
+ g_print ("\n\n==== Disappearing channel ====\n");
+
+ {
+ TpBaseChannel *base = TP_BASE_CHANNEL (service_chan);
+ TpHandle self_handle = tp_base_connection_get_self_handle (
+ service_conn_as_base);
+
+ /* first make the channel disappear and make sure it's off the
+ * bus */
+ tp_base_channel_disappear (base);
+
+ g_assert (!tp_base_channel_is_registered (base));
+
+ /* now reopen it and make sure it's got new requested/initiator
+ * values, as well as being back on the bus. */
+ tp_base_channel_reopened_with_requested (base, TRUE, self_handle);
+
+ g_assert_cmpuint (tp_base_channel_get_initiator (base), ==, self_handle);
+ g_assert (tp_base_channel_is_requested (base));
+
+ g_assert (tp_base_channel_is_registered (base));
+ }
+
g_print ("\n\n==== Destroying channel ====\n");
{