summaryrefslogtreecommitdiff
path: root/src/tests/evas/evas_test_textblock.c
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2015-12-02 09:36:47 +0200
committerDaniel Hirt <daniel.hirt@samsung.com>2015-12-02 09:52:01 +0200
commit809d8fdafea0b38aa21c40dd9460be82dffece3a (patch)
tree09adb75e0eff4bfc6a9b876ef77da7a9e57dab88 /src/tests/evas/evas_test_textblock.c
parentcb227cb5fb2c5faba171e923df6c40e5d186c5ec (diff)
downloadefl-809d8fdafea0b38aa21c40dd9460be82dffece3a.tar.gz
Evas Textblock: Fix text disappear issue when text is made up with multiple items.
Summary: Text is disappearing when we resize a singleline Evas Textblock with ellipsis. It is happened by putting a Text item at logical_items list without considering about logical position. It is only happended the text is made up with multiple items. @fix Test Plan: 1. Run elementary_test 2. Click Label Ellipsis 3. Resize the window dynamically and see the result. Reviewers: woohyun, tasn, herdsman Subscribers: jpeg, subodh6129, shilpasingh, cedric Maniphest Tasks: T2709 Differential Revision: https://phab.enlightenment.org/D3022
Diffstat (limited to 'src/tests/evas/evas_test_textblock.c')
-rw-r--r--src/tests/evas/evas_test_textblock.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 70592b98a0..ad16793299 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2018,6 +2018,37 @@ START_TEST(evas_textblock_wrapping)
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, ellip_w);
+ /* Ellipsis test for multiple items in singleline. */
+ {
+ evas_object_resize(tb, 500, 500);
+ evas_object_textblock_text_markup_set(tb, "ABC 한글한글 DEF");
+ evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0");
+ evas_object_textblock_size_native_get(tb, &nw, &nh);
+ evas_object_resize(tb, nw, nh);
+ evas_object_textblock_size_formatted_get(tb, &w, &h);
+
+ /* Make the object's width smaller. */
+ for (i = 1; (nw / 5) <= (nw - i); i++)
+ {
+ evas_object_resize(tb, nw - i, nh);
+ evas_object_textblock_size_formatted_get(tb, &bw, &bh);
+ ck_assert_int_le(bw, w);
+ }
+
+ /* Revert the object's width to native width. */
+ for (; (nw - i) <= nw; i--)
+ {
+ evas_object_resize(tb, nw - i, nh);
+ evas_object_textblock_size_formatted_get(tb, &bw, &bh);
+ ck_assert_int_le(bw, w);
+ }
+
+ /* The object resized same as native size.
+ * So, formatted width and native width should be same
+ * just like our first check. */
+ ck_assert_int_eq(bw, w);
+ }
+
{
double ellip;
for(ellip = 0.0; ellip <= 1.0; ellip = ellip + 0.1)