static void test_ephy_completion_model_create (void) { EphyCompletionModel *model; model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())), ephy_shell_get_bookmarks (ephy_shell_get_default ()), TRUE); g_assert (model); g_object_unref (model); }
static void ephy_completion_model_init (EphyCompletionModel *model) { EphyCompletionModelPrivate *priv; EphyBookmarks *bookmarks_service; model->priv = priv = EPHY_COMPLETION_MODEL_GET_PRIVATE (model); priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())); bookmarks_service = ephy_shell_get_bookmarks (ephy_shell_get_default ()); priv->bookmarks = ephy_bookmarks_get_bookmarks (bookmarks_service); }
static void test_ephy_completion_model_update_empty (void) { EphyCompletionModel *model; GMainLoop *loop = NULL; model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())), ephy_shell_get_bookmarks (ephy_shell_get_default ()), TRUE); g_assert (model); loop = g_main_loop_new (NULL, FALSE); ephy_completion_model_update_for_string (model, "hello", (EphyHistoryJobCallback)update_empty_cb, loop); g_main_loop_run (loop); g_object_unref (model); g_main_loop_unref (loop); }