From b70fe20a489b0a89e4f8779551e87698434485a5 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Tue, 4 Sep 2012 14:48:26 +0200 Subject: ephy-snapshot-service: Split ephy_snapshot_service_get_snapshot_async() ephy_snapshot_service_get_snapshot_async() receives an option web view parameter, that it's only used in case the snapshot is not the in the thumbnails cache. We can split the method into ephy_snapshot_service_get_snapshot_async() to get a snapshot from a web view and ephy_snapshot_service_get_snapshot_for_url_async() to get a snapshot from the cache. The former uses the latter to try first if the web view URI is in the cache. Patch includes other cleanups and fixes: - Add missing ephy_snapshot_service_save_snapshot_finish() - Add EphySnapshotServiceError to handle errors - Use GSimpleAsyncResult API instead of using GIOScheduler directly - Use different async data structs for every async operation https://bugzilla.gnome.org/show_bug.cgi?id=683327 --- tests/ephy-snapshot-service-test.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'tests') diff --git a/tests/ephy-snapshot-service-test.c b/tests/ephy-snapshot-service-test.c index 2ece2df1e..5c352e040 100644 --- a/tests/ephy-snapshot-service-test.c +++ b/tests/ephy-snapshot-service-test.c @@ -84,7 +84,6 @@ test_snapshot (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI, mtime, NULL, (GAsyncReadyCallback)on_snapshot_ready, @@ -102,7 +101,6 @@ test_cached_snapshot (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI, mtime, NULL, (GAsyncReadyCallback)on_snapshot_ready, @@ -121,7 +119,6 @@ test_many_snapshots (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI "/some"); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/some", mtime, NULL, (GAsyncReadyCallback)on_snapshot_ready, @@ -131,7 +128,6 @@ test_many_snapshots (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI "/other"); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/other", mtime, NULL, (GAsyncReadyCallback)on_snapshot_ready, @@ -141,7 +137,6 @@ test_many_snapshots (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI "/place"); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/place", mtime, NULL, (GAsyncReadyCallback)on_snapshot_ready, @@ -160,7 +155,6 @@ test_snapshot_with_cancellable (void) webkit_web_view_load_uri (webview, TEST_SERVER_URI "/and"); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/and", mtime, cancellable, (GAsyncReadyCallback)on_snapshot_ready, @@ -180,7 +174,6 @@ test_already_cancelled_snapshot (void) g_cancellable_cancel (cancellable); ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/so", mtime, cancellable, (GAsyncReadyCallback)on_snapshot_ready, @@ -207,7 +200,6 @@ test_snapshot_and_timed_cancellation (void) ephy_snapshot_service_get_snapshot_async (service, webview, - TEST_SERVER_URI "/on", mtime, cancellable, (GAsyncReadyCallback)on_snapshot_ready, -- cgit v1.2.3