summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-03-14 11:11:32 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-03-14 11:11:32 -0400
commitba1c94d051ebfd3c57a9220e8553bd7a950b0fce (patch)
treec7fc5b0283f5f47095244138d24082667e231582 /src/tests
parente43b644168e3be77c0e4a29335c326f9237bb17d (diff)
efl_ui_layout: fix elm_layout_text_set behavior
Summary: Since commit 649433560b5b, elm_layout_text_set didn't work on some widgets. This patch fixes invisible text issues. Test Plan: 1. make check 2. elementary_test -to 'popup' Reviewers: zmike, segfaultxavi, bu5hm4n Reviewed By: zmike Subscribers: cedric, #reviewers, herb, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8326
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_test_entry.c20
-rw-r--r--src/tests/elementary/elm_test_popup.c15
2 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_entry.c b/src/tests/elementary/elm_test_entry.c
index 969681f4e4..cbeaed1d10 100644
--- a/src/tests/elementary/elm_test_entry.c
+++ b/src/tests/elementary/elm_test_entry.c
@@ -393,6 +393,25 @@ EFL_START_TEST(elm_atspi_role_get)
393} 393}
394EFL_END_TEST 394EFL_END_TEST
395 395
396EFL_START_TEST(elm_entry_text_set)
397{
398 Evas_Object *win, *entry;
399 const char *entry_text = "hello world";
400 const char *entry_text2 = "scrollable";
401
402 win = win_add(NULL, "entry", ELM_WIN_BASIC);
403
404 entry = elm_entry_add(win);
405
406 ck_assert(elm_layout_text_set(entry, NULL, entry_text));
407 ck_assert_str_eq(elm_object_text_get(entry), entry_text);
408
409 elm_entry_scrollable_set(entry, EINA_TRUE);
410 ck_assert(elm_layout_text_set(entry, NULL, entry_text2));
411 ck_assert_str_eq(elm_object_text_get(entry), entry_text2);
412}
413EFL_END_TEST
414
396void elm_test_entry(TCase *tc) 415void elm_test_entry(TCase *tc)
397{ 416{
398 tcase_add_test(tc, elm_entry_legacy_type_check); 417 tcase_add_test(tc, elm_entry_legacy_type_check);
@@ -407,4 +426,5 @@ void elm_test_entry(TCase *tc)
407 tcase_add_test(tc, elm_entry_atspi_text_text_get); 426 tcase_add_test(tc, elm_entry_atspi_text_text_get);
408 tcase_add_test(tc, elm_entry_atspi_text_selections); 427 tcase_add_test(tc, elm_entry_atspi_text_selections);
409 tcase_add_test(tc, elm_atspi_role_get); 428 tcase_add_test(tc, elm_atspi_role_get);
429 tcase_add_test(tc, elm_entry_text_set);
410} 430}
diff --git a/src/tests/elementary/elm_test_popup.c b/src/tests/elementary/elm_test_popup.c
index d4dc75e79c..ba3143eb17 100644
--- a/src/tests/elementary/elm_test_popup.c
+++ b/src/tests/elementary/elm_test_popup.c
@@ -70,9 +70,24 @@ EFL_START_TEST(elm_popup_focus_get)
70} 70}
71EFL_END_TEST 71EFL_END_TEST
72 72
73EFL_START_TEST(elm_popup_text_set)
74{
75 Evas_Object *win, *popup;
76 const char *popup_text = "hello world";
77
78 win = win_add(NULL, "popup", ELM_WIN_BASIC);
79
80 popup = elm_popup_add(win);
81
82 ck_assert(elm_layout_text_set(popup, NULL, popup_text));
83 ck_assert_str_eq(elm_object_text_get(popup), popup_text);
84}
85EFL_END_TEST
86
73void elm_test_popup(TCase *tc) 87void elm_test_popup(TCase *tc)
74{ 88{
75 tcase_add_test(tc, elm_popup_focus_get); 89 tcase_add_test(tc, elm_popup_focus_get);
76 tcase_add_test(tc, elm_popup_legacy_type_check); 90 tcase_add_test(tc, elm_popup_legacy_type_check);
91 tcase_add_test(tc, elm_popup_text_set);
77 tcase_add_test(tc, elm_atspi_role_get); 92 tcase_add_test(tc, elm_atspi_role_get);
78} 93}