From: Vincent Cappe Date: Thu, 12 Apr 2012 00:35:14 +0000 (+0200) Subject: Update extension test to extension_init changes X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3428fbb586ce2074b26364266641d798b31a571d;p=midori Update extension test to extension_init changes --- diff --git a/tests/extensions.c b/tests/extensions.c index 22b6853a..a5baa1fa 100644 --- a/tests/extensions.c +++ b/tests/extensions.c @@ -166,13 +166,25 @@ extension_settings (void) static void extension_activate (gconstpointer data) { + MidoriExtension* extension; MidoriApp* app = midori_app_new (); - MidoriExtension* extension = MIDORI_EXTENSION (data); - if (extension == NULL) - return; g_object_set (app, "settings", midori_web_settings_new (), NULL); - g_signal_emit_by_name (extension, "activate", app); - midori_extension_deactivate (extension); + + if (MIDORI_IS_EXTENSION (data)) + { + extension = MIDORI_EXTENSION (data); + g_signal_emit_by_name (extension, "activate", app); + midori_extension_deactivate (extension); + } + else if (KATZE_IS_ARRAY (data)) + { + KATZE_ARRAY_FOREACH_ITEM (extension, KATZE_ARRAY (data)) + { + g_signal_emit_by_name (extension, "activate", app); + midori_extension_deactivate (extension); + } + } + g_object_unref (app); }