[Telepathy-commits] [telepathy-glib/master] callable-example test: assert that the stream becomes connected
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 13 09:31:43 PDT 2009
---
tests/dbus/callable-example.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/dbus/callable-example.c b/tests/dbus/callable-example.c
index 56b8d06..4c6084b 100644
--- a/tests/dbus/callable-example.c
+++ b/tests/dbus/callable-example.c
@@ -671,6 +671,19 @@ test_basics (Test *test,
g_assert_cmpuint (tp_asv_get_uint32 (ge->details, "change-reason", NULL), ==,
TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ /* The stream should become connected after a while */
+
+ se = test->stream_events->data;
+
+ while (se->type != STREAM_EVENT_STATE_CHANGED)
+ {
+ g_main_context_iteration (NULL, TRUE);
+ se = test->stream_events->data;
+ }
+
+ g_assert_cmpuint (se->id, ==, audio_stream_id);
+ g_assert_cmpuint (se->state, ==, TP_MEDIA_STREAM_STATE_CONNECTED);
+
/* RequestStreams again, to add a video stream */
tp_cli_channel_type_streamed_media_call_request_streams (test->chan, -1,
@@ -840,8 +853,6 @@ test_basics (Test *test,
* RequestStreamDirection
* StreamDirectionChanged being emitted correctly (part of RSD)
* RequestStreamDirection failing (invalid direction, stream ID)
- *
- * StreamStateChanged being emitted (???)
*/
}
--
1.5.6.5
More information about the telepathy-commits
mailing list