From: Christian Dywan Date: Wed, 8 Aug 2012 23:01:44 +0000 (+0200) Subject: Fix inconsistency in test initializations X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35dfebd1c6af4a39c8d6d18f76111d15bf62cb37;p=midori Fix inconsistency in test initializations --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a3851d8c..f3514302 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3688,6 +3688,9 @@ _action_caret_browsing_activate (GtkAction* action, gint response; GtkWidget* dialog; + if (!gtk_widget_get_visible (GTK_WIDGET (browser))) + return; + if (!katze_object_get_boolean (browser->settings, "enable-caret-browsing")) { dialog = gtk_message_dialog_new (GTK_WINDOW (browser), diff --git a/tests/bookmarks.c b/tests/bookmarks.c index bce08d7f..68471646 100644 --- a/tests/bookmarks.c +++ b/tests/bookmarks.c @@ -195,6 +195,7 @@ main (int argc, //TestParameters default_params = {":memory:", TRUE, NULL, NULL}; TestParameters default_params = {":memory:", FALSE, NULL, NULL}; + g_test_init (&argc, &argv, NULL); midori_app_setup (&argc, &argv, NULL, NULL); g_test_add ("/bookmarks/simple test", diff --git a/tests/browser.c b/tests/browser.c index 5b9ee85e..710e25ce 100644 --- a/tests/browser.c +++ b/tests/browser.c @@ -130,11 +130,12 @@ int main (int argc, char** argv) { - g_object_set_data (G_OBJECT (webkit_get_default_session ()), - "midori-session-initialized", (void*)1); g_test_init (&argc, &argv, NULL); midori_app_setup (&argc, &argv, NULL, NULL); + g_object_set_data (G_OBJECT (webkit_get_default_session ()), + "midori-session-initialized", (void*)1); + g_test_add_func ("/browser/create", browser_create); g_test_add_func ("/browser/tooltips", browser_tooltips); g_test_add_func ("/browser/site_data", browser_site_data); diff --git a/tests/properties.c b/tests/properties.c index d6abd2f1..46ad284e 100644 --- a/tests/properties.c +++ b/tests/properties.c @@ -187,11 +187,12 @@ int main (int argc, char** argv) { - g_object_set_data (G_OBJECT (webkit_get_default_session ()), - "midori-session-initialized", (void*)1); g_test_init (&argc, &argv, NULL); midori_app_setup (&argc, &argv, NULL, NULL); + g_object_set_data (G_OBJECT (webkit_get_default_session ()), + "midori-session-initialized", (void*)1); + g_test_add_data_func ("/properties/app", (gconstpointer)MIDORI_TYPE_APP, properties_type_test); g_test_add_data_func ("/properties/browser",