summaryrefslogtreecommitdiff
path: root/tests/ephy-snapshot-service-test.c
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2016-03-21 23:13:34 -0500
committerMichael Catanzaro <mcatanzaro@igalia.com>2016-03-21 23:55:15 -0500
commitc5d5bd28f071b3734b0f07af7e802f902263d6f0 (patch)
tree32a2bf0127ac7732e4afa4dd65da6c81b17585ee /tests/ephy-snapshot-service-test.c
parent17c9805c3b7901d17666c71a2163de980eb5c774 (diff)
downloadepiphany-uncrustify.tar.gz
Uncrustifyuncrustify
For a better future. Apologies when your 'git blame' resolves to this. I'm actually really impressed how well uncrustify works. This required only a little one-time manual work to avoid extra space in 'else {'. This breaks function prototype alignment, but we should get rid of most of those anyway. We decided to start aligning function parameters, like other GNOME applications. It looks nicer this way, and I couldn't teach uncrustify the previous Epiphany style.
Diffstat (limited to 'tests/ephy-snapshot-service-test.c')
-rw-r--r--tests/ephy-snapshot-service-test.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/tests/ephy-snapshot-service-test.c b/tests/ephy-snapshot-service-test.c
index 8974a3f17..a442a38d5 100644
--- a/tests/ephy-snapshot-service-test.c
+++ b/tests/ephy-snapshot-service-test.c
@@ -29,8 +29,8 @@ SoupServer *server;
static gboolean
quit_when_test_done (GtkWidget *w,
- GdkEvent *event,
- gint *tests)
+ GdkEvent *event,
+ gint *tests)
{
if (--(*tests) == 0)
gtk_main_quit ();
@@ -39,13 +39,13 @@ quit_when_test_done (GtkWidget *w,
}
static void
-on_snapshot_ready (GObject *source,
+on_snapshot_ready (GObject *source,
GAsyncResult *res,
- gint *tests)
+ gint *tests)
{
GdkPixbuf *pixbuf;
#if 0
- GtkWidget *w,*i;
+ GtkWidget *w, *i;
#endif
GError *error = NULL;
@@ -61,14 +61,14 @@ on_snapshot_ready (GObject *source,
} else
#if 0
- w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
i = gtk_image_new_from_pixbuf (pixbuf);
gtk_container_add (GTK_CONTAINER (w), i);
gtk_widget_show_all (w);
g_signal_connect (w, "delete-event",
G_CALLBACK (quit_when_test_done), tests);
#else
- quit_when_test_done (NULL, NULL, tests);
+ quit_when_test_done (NULL, NULL, tests);
#endif
}
@@ -213,12 +213,11 @@ server_callback (SoupServer *s, SoupMessage *msg,
const char *response = "<html><h1>This is a header</h1></html>";
if (msg->method == SOUP_METHOD_GET) {
- soup_message_set_status (msg, SOUP_STATUS_OK);
- soup_message_body_append (msg->response_body, SOUP_MEMORY_STATIC,
+ soup_message_set_status (msg, SOUP_STATUS_OK);
+ soup_message_body_append (msg->response_body, SOUP_MEMORY_STATIC,
response, strlen (response));
- soup_message_body_complete (msg->response_body);
- }
- else
+ soup_message_body_complete (msg->response_body);
+ } else
soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
}
@@ -230,12 +229,12 @@ main (int argc, char *argv[])
server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "snapshot-service-test-server",
NULL);
- soup_server_add_handler (server, NULL,
+ soup_server_add_handler (server, NULL,
server_callback, NULL, NULL);
soup_server_listen_local (server, 45716,
SOUP_SERVER_LISTEN_IPV4_ONLY,
NULL);
- mtime = time(NULL);
+ mtime = time (NULL);
g_test_add_func ("/lib/ephy-snapshot-service/test_snapshot",
test_snapshot);