[evolution/gnome-3-22] Make the EContentEditor accessible in tests



commit 5e75ae5cba8040c771ac44bfbe29b715a82035f2
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Oct 14 09:09:31 2016 +0200

    Make the EContentEditor accessible in tests
    
    This will be handy for some tests as we don't need grow the tests API to
    contain every EContentEditor call.

 e-util/test-html-editor-units-utils.c |   12 ++++++++++++
 e-util/test-html-editor-units-utils.h |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/e-util/test-html-editor-units-utils.c b/e-util/test-html-editor-units-utils.c
index 90fbbf6..9da4d05 100644
--- a/e-util/test-html-editor-units-utils.c
+++ b/e-util/test-html-editor-units-utils.c
@@ -1034,3 +1034,15 @@ test_utils_get_clipboard_text (gboolean request_html)
 
        return text;
 }
+
+EContentEditor *
+test_utils_get_content_editor (TestFixture *fixture)
+{
+       EContentEditor *cnt_editor;
+
+       g_return_val_if_fail (fixture != NULL, NULL);
+       g_return_val_if_fail (E_IS_HTML_EDITOR (fixture->editor), NULL);
+
+       cnt_editor = e_html_editor_get_content_editor (fixture->editor);
+       return cnt_editor;
+}
diff --git a/e-util/test-html-editor-units-utils.h b/e-util/test-html-editor-units-utils.h
index 2e5a14b..d5ab9e6 100644
--- a/e-util/test-html-editor-units-utils.h
+++ b/e-util/test-html-editor-units-utils.h
@@ -93,6 +93,8 @@ void          test_utils_insert_content       (TestFixture *fixture,
 void           test_utils_set_clipboard_text   (const gchar *text,
                                                 gboolean is_html);
 gchar *                test_utils_get_clipboard_text   (gboolean request_html);
+EContentEditor *
+               test_utils_get_content_editor   (TestFixture *fixture);
 
 G_END_DECLS
 


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