[epiphany] tests: register the application explicitly
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] tests: register the application explicitly
- Date: Sun, 2 Sep 2012 20:42:46 +0000 (UTC)
commit a66dcf2c036c9760e9b6daddccd55077be0b052b
Author: Xan Lopez <xan igalia com>
Date: Sun Sep 2 22:40:57 2012 +0200
tests: register the application explicitly
This usually happens in _run, it seems, but the tests don't do that,
so we need to call this manually. Otherwise the test will fail with:
(/home/xan/git/epiphany/build/tests/test-ephy-session:9865): GLib-GIO-CRITICAL
**: g_application_list_actions: assertion `application->priv->is_registered'
failed
No idea why this has started happening only now.
https://bugzilla.gnome.org/show_bug.cgi?id=682653
tests/ephy-session-test.c | 2 ++
tests/ephy-shell-test.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/ephy-session-test.c b/tests/ephy-session-test.c
index 57b29fd..55454b2 100644
--- a/tests/ephy-session-test.c
+++ b/tests/ephy-session-test.c
@@ -174,6 +174,8 @@ main (int argc, char *argv[])
_ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST);
g_assert (ephy_shell);
+ g_application_register (G_APPLICATION (ephy_shell), NULL, NULL);
+
g_test_add_func ("/src/ephy-session/load",
test_ephy_session_load);
diff --git a/tests/ephy-shell-test.c b/tests/ephy-shell-test.c
index 84626ae..8518de1 100644
--- a/tests/ephy-shell-test.c
+++ b/tests/ephy-shell-test.c
@@ -332,13 +332,14 @@ main (int argc, char *argv[])
ephy_debug_init ();
ephy_embed_prefs_init ();
- _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_PRIVATE);
-
if (!ephy_file_helpers_init (NULL, EPHY_FILE_HELPERS_PRIVATE_PROFILE | EPHY_FILE_HELPERS_ENSURE_EXISTS, NULL)) {
g_debug ("Something wrong happened with ephy_file_helpers_init()");
return -1;
}
+ _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_PRIVATE);
+ g_application_register (G_APPLICATION (ephy_shell), NULL, NULL);
+
g_test_add_func ("/src/ephy-shell/basic_embeds",
test_ephy_shell_basic_embeds);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]