[epiphany] embed-shell: Clarify startup a bit



commit 4ee761874a41c2331c8b510139516922c09fbc73
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Nov 1 20:28:37 2016 -0500

    embed-shell: Clarify startup a bit
    
    Tests don't run the embed shell application instance.
    
    Hence, this is a great place to create the UriTester. Right before the
    D-Bus server is created.

 embed/ephy-embed-shell.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index f40fffa..73250cc 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -738,10 +738,9 @@ ephy_embed_shell_startup (GApplication *application)
 
   G_APPLICATION_CLASS (ephy_embed_shell_parent_class)->startup (application);
 
-  /* We're not remoting, setup the Web Context if we are not running in a test.
-     Tests already do this after construction. */
-  if (priv->mode != EPHY_EMBED_SHELL_MODE_TEST)
-    ephy_embed_shell_create_web_context (embed_shell);
+  ephy_embed_shell_create_web_context (embed_shell);
+
+  priv->uri_tester = ephy_uri_tester_new ();
 
   ephy_embed_shell_setup_web_extensions_server (shell);
 
@@ -905,9 +904,6 @@ ephy_embed_shell_constructed (GObject *object)
     priv->user_content = webkit_user_content_manager_new ();
   }
 
-  if (mode != EPHY_EMBED_SHELL_MODE_SEARCH_PROVIDER)
-    priv->uri_tester = ephy_uri_tester_new ();
-
   g_signal_connect_object (ephy_snapshot_service_get_default (),
                            "snapshot-saved", G_CALLBACK (snapshot_saved_cb),
                            shell, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]