[epiphany] ephy-download-test: correctly use fixture objects



commit f056c1e715f4a3d0886b2fb0686f3f9bc3cbd74c
Author: Diego Escalante Urrelo <diegoe igalia com>
Date:   Sat Mar 31 21:40:15 2012 -0500

    ephy-download-test: correctly use fixture objects
    
    Do not use adhoc EphyDownload objects that have no proper destination
    set, or your current user's downloads directory will be filled with test
    files.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673274

 tests/ephy-download-test.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c
index 2ebb08a..4622709 100644
--- a/tests/ephy-download-test.c
+++ b/tests/ephy-download-test.c
@@ -139,23 +139,8 @@ test_ephy_download_new (Fixture *fixture, gconstpointer data)
 static void
 test_ephy_download_new_for_uri (Fixture *fixture, gconstpointer data)
 {
-  EphyDownload *download;
-
-  download = ephy_download_new_for_uri (fixture->source);
-
-  g_assert (EPHY_IS_DOWNLOAD (download));
-
-  g_assert_cmpstr (fixture->source, ==, ephy_download_get_source_uri (download));
-
-  g_signal_connect (G_OBJECT (download), "completed",
-                    G_CALLBACK (completed_cb), fixture);
-
-  ephy_download_start (download);
-
-  g_object_unref (fixture->download);
-  fixture->download = download;
-
-  g_main_loop_run (fixture->loop);
+  g_assert_cmpstr (fixture->source, ==,
+                   ephy_download_get_source_uri (fixture->download));
 }
 
 static void



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