[evolution/wip/webkit2] Add new convenient function test_utils_insert_content()



commit 430b099c42881970d5d0beeb0bbcfadca65e9615
Author: Milan Crha <mcrha redhat com>
Date:   Tue Aug 2 10:23:49 2016 +0200

    Add new convenient function test_utils_insert_content()

 e-util/test-html-editor-units-utils.c |   15 +++++++++++++++
 e-util/test-html-editor-units-utils.h |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/e-util/test-html-editor-units-utils.c b/e-util/test-html-editor-units-utils.c
index b44004a..b555133 100644
--- a/e-util/test-html-editor-units-utils.c
+++ b/e-util/test-html-editor-units-utils.c
@@ -930,3 +930,18 @@ test_utils_run_simple_test (TestFixture *fixture,
 
        return TRUE;
 }
+
+void
+test_utils_insert_content (TestFixture *fixture,
+                          const gchar *content,
+                          EContentEditorInsertContentFlags flags)
+{
+       EContentEditor *cnt_editor;
+
+       g_return_if_fail (fixture != NULL);
+       g_return_if_fail (E_IS_HTML_EDITOR (fixture->editor));
+       g_return_if_fail (content != NULL);
+
+       cnt_editor = e_html_editor_get_content_editor (fixture->editor);
+       e_content_editor_insert_content (cnt_editor, content, flags);
+}
diff --git a/e-util/test-html-editor-units-utils.h b/e-util/test-html-editor-units-utils.h
index b234ab3..78f470c 100644
--- a/e-util/test-html-editor-units-utils.h
+++ b/e-util/test-html-editor-units-utils.h
@@ -79,5 +79,8 @@ gboolean      test_utils_run_simple_test      (TestFixture *fixture,
                                                 const gchar *commands,
                                                 const gchar *expected_html,
                                                 const gchar *expected_plain);
+void           test_utils_insert_content       (TestFixture *fixture,
+                                                const gchar *content,
+                                                EContentEditorInsertContentFlags flags);
 
 #endif /* TEST_HTML_EDITOR_UNITS_UTILS_H */


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