From f056c1e715f4a3d0886b2fb0686f3f9bc3cbd74c Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Sat, 31 Mar 2012 21:40:15 -0500 Subject: 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 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c index 2ebb08a32..462270943 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 -- cgit