コード例 #1
0
static void
test_ephy_completion_model_create (void)
{
  EphyCompletionModel *model;
  model = ephy_completion_model_new (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()),
                                     ephy_shell_get_bookmarks_manager (ephy_shell_get_default ()));
  g_assert (model);
  g_object_unref (model);
}
コード例 #2
0
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);
}
コード例 #3
0
static void
test_ephy_completion_model_update_empty (void)
{
  EphyCompletionModel *model;
  GMainLoop *loop = NULL;

  model = ephy_completion_model_new (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()),
                                     ephy_shell_get_bookmarks_manager (ephy_shell_get_default ()));
  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);
}