Fix test issues due to unset settings, version, session
This commit is contained in:
parent
4cb498940d
commit
eb205d53d4
3 changed files with 5 additions and 2 deletions
|
@ -428,12 +428,12 @@ midori_extension_set_property (GObject* object,
|
|||
{
|
||||
/* Don't show version suffix if it matches the running Midori */
|
||||
const gchar* version = g_value_get_string (value);
|
||||
if (g_str_has_suffix (version, MIDORI_VERSION_SUFFIX))
|
||||
if (version && g_str_has_suffix (version, MIDORI_VERSION_SUFFIX))
|
||||
katze_assign (extension->priv->version,
|
||||
g_strndup (version,
|
||||
strlen (version) - strlen (MIDORI_VERSION_SUFFIX)));
|
||||
/* No version suffix at all, must be 0.4.1 or 0.4.1 git */
|
||||
else if (!strchr (version, '-') && !strchr (version, '('))
|
||||
else if (version && !strchr (version, '-') && !strchr (version, '('))
|
||||
katze_assign (extension->priv->version,
|
||||
g_strconcat (version, " (0.4.1)", NULL));
|
||||
else
|
||||
|
|
|
@ -168,6 +168,7 @@ extension_activate (gconstpointer data)
|
|||
{
|
||||
MidoriApp* app = midori_app_new ();
|
||||
MidoriExtension* extension = MIDORI_EXTENSION (data);
|
||||
g_object_set (app, "settings", midori_web_settings_new (), NULL);
|
||||
g_signal_emit_by_name (extension, "activate", app);
|
||||
midori_extension_deactivate (extension);
|
||||
g_object_unref (app);
|
||||
|
|
|
@ -189,6 +189,8 @@ main (int argc,
|
|||
char** argv)
|
||||
{
|
||||
midori_app_setup (argv);
|
||||
g_object_set_data (G_OBJECT (webkit_get_default_session ()),
|
||||
"midori-session-initialized", (void*)1);
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
gtk_init_check (&argc, &argv);
|
||||
|
||||
|
|
Loading…
Reference in a new issue