[evolution-data-server/sqlite-refactor: 20/22] test-client-revision-view: Disabled part of the test.



commit 0d9ade3b070d7f29270704417b42a6cd627236ff
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri Nov 29 21:25:24 2013 +0900

    test-client-revision-view: Disabled part of the test.
    
    Initial changes are filtered by fields-of-interest, however
    change notifications are not filtered, this is because it's actually
    faster to just send the vcard as is.

 tests/libebook/client/test-client-revision-view.c |   35 ++------------------
 1 files changed, 4 insertions(+), 31 deletions(-)
---
diff --git a/tests/libebook/client/test-client-revision-view.c 
b/tests/libebook/client/test-client-revision-view.c
index ac1403d..21ecc7a 100644
--- a/tests/libebook/client/test-client-revision-view.c
+++ b/tests/libebook/client/test-client-revision-view.c
@@ -11,25 +11,10 @@ static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NUL
 
 #define N_TEST_CONTACTS 4
 
-static gboolean loading_view = FALSE;
-
 /****************************************************************
  *                     Modify/Setup the EBook                   *
  ****************************************************************/
 static void
-add_contact (EBookClient *client)
-{
-       EContact *contact = e_contact_new ();
-
-       e_contact_set (contact, E_CONTACT_FULL_NAME, "Micheal Jackson");
-
-       if (!add_contact_verify (client, contact))
-               g_error ("Failed to add Micheal Jackson");
-
-       g_object_unref (contact);
-}
-
-static void
 setup_book (EBookClient *book_client)
 {
        gint    i;
@@ -78,7 +63,6 @@ objects_added (EBookClientView *view,
                const GSList *contacts,
                gpointer user_data)
 {
-       GMainLoop *loop = (GMainLoop *) user_data;
        const GSList *l;
 
        for (l = contacts; l; l = l->next) {
@@ -92,9 +76,6 @@ objects_added (EBookClientView *view,
                                (gchar *) e_contact_get_const (contact, E_CONTACT_FULL_NAME));
        }
 
-       if (!loading_view)
-               finish_test (view, loop);
-
 }
 
 static void
@@ -110,17 +91,11 @@ objects_removed (EBookClientView *view,
 
 static void
 complete (EBookClientView *view,
-          const GError *error)
+          const GError *error,
+         gpointer user_data)
 {
-       EBookClient *client;
-
-       client = e_book_client_view_ref_client (view);
-
-       /* Now add a contact and assert that we received notification */
-       loading_view = FALSE;
-       add_contact (client);
-
-       g_object_unref (client);
+       GMainLoop *loop = (GMainLoop *) user_data;
+       finish_test (view, loop);
 }
 
 static void
@@ -143,8 +118,6 @@ setup_and_start_view (EBookClientView *view,
        if (error)
                g_error ("set fields of interest: %s", error->message);
 
-       loading_view = TRUE;
-
        e_book_client_view_start (view, &error);
        if (error)
                g_error ("start view: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]