[Telepathy-commits] [telepathy-gabble/master] ressurect the gadget-restarted test

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu Oct 9 09:00:50 PDT 2008


---
 src/conn-olpc.c                        |   27 +--------------------------
 tests/twisted/olpc/gadget-restarted.py |    8 ++------
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 8a42f76..e97d815 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -3760,28 +3760,6 @@ olpc_gadget_publish (GabbleSvcOLPCGadget *iface,
   gabble_svc_olpc_gadget_return_from_publish (context);
 }
 
-#if 0
-static gboolean
-close_view_foreach (gpointer key,
-                    GabbleOlpcView *view,
-                    GabbleConnection *conn)
-{
-  g_signal_handlers_disconnect_by_func (view, G_CALLBACK (view_closed_cb),
-      conn);
-
-  gabble_olpc_view_close (view, NULL);
-
-  return TRUE;
-}
-
-static void
-close_all_views (GabbleConnection *conn)
-{
-  g_hash_table_foreach_remove (conn->olpc_views, (GHRFunc) close_view_foreach,
-      conn);
-}
-#endif
-
 LmHandlerResult
 conn_olpc_presence_cb (LmMessageHandler *handler,
                        LmConnection *connection,
@@ -3835,15 +3813,12 @@ conn_olpc_presence_cb (LmMessageHandler *handler,
             }
         }
     }
-#if 0
   else if (sub_type == LM_MESSAGE_SUB_TYPE_NOT_SET ||
       sub_type == LM_MESSAGE_SUB_TYPE_AVAILABLE)
     {
       DEBUG ("Got presence from Gadget. Close open views if any");
-      /* FIXME: gabble_olpc_gadget_manager_close_all_views (); */
-      close_all_views (conn);
+      gabble_olpc_gadget_manager_close_all_views (conn->olpc_gadget_manager);
     }
-#endif
 
   return LM_HANDLER_RESULT_REMOVE_MESSAGE;
 }
diff --git a/tests/twisted/olpc/gadget-restarted.py b/tests/twisted/olpc/gadget-restarted.py
index da5e7b4..1dab650 100644
--- a/tests/twisted/olpc/gadget-restarted.py
+++ b/tests/twisted/olpc/gadget-restarted.py
@@ -2,10 +2,6 @@
 test OLPC search activity
 """
 
-print "FIXME: olpc/gadget-restarted.py disabled during requestotronification of the view API"
-# exiting 77 causes automake to consider the test to have been skipped
-raise SystemExit(77)
-
 import dbus
 
 from servicetest import call_async, EventPattern
@@ -51,7 +47,7 @@ def test(q, bus, conn, stream):
     sync_stream(q, stream)
 
     # request 3 random activities (view 0)
-    view_path = request_random_activity_view(q, stream, conn, 3, '0',
+    view_path = request_random_activity_view(q, stream, conn, 3, '1',
             [('activity1', 'room1 at conference.localhost',
                 {'color': ('str', '#005FE4,#00A0FF')},
                 [('lucien at localhost', {'color': ('str', '#AABBCC,#CCBBAA')}),
@@ -64,7 +60,7 @@ def test(q, bus, conn, stream):
     presence = elem('presence', from_='gadget.localhost', to='test at localhost')
     stream.send(presence)
 
-    q.expect('dbus-signal', signal='Closed', interface='org.laptop.Telepathy.View')
+    q.expect('dbus-signal', signal='Closed', interface='org.freedesktop.Telepathy.Channel')
 
 if __name__ == '__main__':
     exec_test(test)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list