aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-03-10 04:18:28 +0800
committerXan Lopez <xan@igalia.com>2013-03-11 20:38:46 +0800
commit6da63a35ffe4254084c80d5abb568f9e9906be5a (patch)
tree6311c96033b634b06ff3e7f04f131efd5e659994 /tests
parentbc16d2a4d7c0dc06f5c36ca3c75c7eb40f5c3676 (diff)
downloadgsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar.gz
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar.bz2
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar.lz
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar.xz
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.tar.zst
gsoc2013-epiphany-6da63a35ffe4254084c80d5abb568f9e9906be5a.zip
ephy-embed-shell: add a ::web-view-created signal
Emitted every time we create an EphyWebView anywhere. This will be useful in our tests. https://bugzilla.gnome.org/show_bug.cgi?id=695300
Diffstat (limited to 'tests')
-rw-r--r--tests/ephy-embed-shell-test.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ephy-embed-shell-test.c b/tests/ephy-embed-shell-test.c
index 27c1b9c46..ef30b448b 100644
--- a/tests/ephy-embed-shell-test.c
+++ b/tests/ephy-embed-shell-test.c
@@ -59,6 +59,31 @@ test_ephy_embed_shell_launch_handler (void)
g_object_unref (file);
}
+#if 0
+static void
+web_view_created_cb (EphyEmbedShell *shell, EphyWebView *view, gpointer user_data)
+{
+ gboolean *web_view_created = (gboolean*)user_data;
+ *web_view_created = TRUE;
+}
+
+static void
+test_ephy_embed_shell_web_view_created (void)
+{
+ EphyEmbedShell *embed_shell;
+ GtkWidget *view;
+ gboolean web_view_created = FALSE;
+
+ embed_shell = ephy_embed_shell_get_default ();
+ g_signal_connect (embed_shell, "web-view-created",
+ G_CALLBACK (web_view_created_cb), &web_view_created);
+
+ view = ephy_web_view_new ();
+ g_assert (web_view_created);
+ gtk_widget_destroy (view);
+}
+#endif
+
int
main (int argc, char *argv[])
{
@@ -82,6 +107,13 @@ main (int argc, char *argv[])
g_test_add_func ("/embed/ephy-embed-shell/launch_handler",
test_ephy_embed_shell_launch_handler);
+/* FIXME: this won't run because of the XDG_DATA_{DIRS,HOME} stuff,
+ * see: https://bugzilla.gnome.org/show_bug.cgi?id=695620 */
+#if 0
+ g_test_add_func ("/embed/ephy-embed-shell/web-view-created",
+ test_ephy_embed_shell_web_view_created);
+#endif
+
ret = g_test_run ();
g_object_unref (ephy_embed_shell_get_default ());