summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-03-11 09:44:16 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-11 21:34:57 +0100
commitda0ff534716774b35a98c359e8c7fd7bdde7a3d2 (patch)
tree9cab1d99dc822903a92123460f351edbc8757036 /src/tests
parente7618b7169b691cb21a1de40e906ffead307aa4a (diff)
ui.widget: fix theme_apply working in sub_object_add
It seems that theme_apply in sub_object_add haven't worked since commit f6fa1ef6120fdebcdaf1568674c48b9d17f76f64. scale, theme property will be set properly when the parent is changed. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8283
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c
index d5f9c4d525..221978bade 100644
--- a/src/tests/elementary/efl_ui_test_widget.c
+++ b/src/tests/elementary/efl_ui_test_widget.c
@@ -188,6 +188,37 @@ EFL_START_TEST(efl_ui_test_widget_sub_object_add_del)
188} 188}
189EFL_END_TEST 189EFL_END_TEST
190 190
191EFL_START_TEST(efl_ui_test_widget_sub_object_theme_sync)
192{
193 State s;
194 Efl_Canvas_Layout *edje;
195
196 _small_ui(&s);
197 edje = elm_widget_resize_object_get(s.btn1);
198
199 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn1), 1.0);
200 ck_assert_double_eq(efl_gfx_entity_scale_get(edje), 1.0);
201 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn2), 1.0);
202
203 efl_gfx_entity_scale_set(s.win, 0.123);
204 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn1), 0.123);
205 ck_assert_double_eq(efl_gfx_entity_scale_get(edje), 0.123);
206 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn2), 0.123);
207
208 efl_ui_widget_sub_object_del(s.box, s.btn1);
209 efl_gfx_entity_scale_set(s.win, 0.456);
210 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn1), 1.0);
211 ck_assert_double_eq(efl_gfx_entity_scale_get(edje), 0.123);
212 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn2), 0.456);
213
214 efl_gfx_entity_scale_set(s.win, 0.789);
215 efl_ui_widget_sub_object_add(s.box, s.btn1);
216 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn1), 0.789);
217 ck_assert_double_eq(efl_gfx_entity_scale_get(edje), 0.789);
218 ck_assert_double_eq(efl_gfx_entity_scale_get(s.btn2), 0.789);
219}
220EFL_END_TEST
221
191void efl_ui_test_widget(TCase *tc) 222void efl_ui_test_widget(TCase *tc)
192{ 223{
193 tcase_add_test(tc, efl_ui_test_widget_parent_iterator); 224 tcase_add_test(tc, efl_ui_test_widget_parent_iterator);
@@ -196,4 +227,5 @@ void efl_ui_test_widget(TCase *tc)
196 tcase_add_test(tc, efl_ui_test_widget_iterator); 227 tcase_add_test(tc, efl_ui_test_widget_iterator);
197 tcase_add_test(tc, efl_ui_test_widget_sub_iterator); 228 tcase_add_test(tc, efl_ui_test_widget_sub_iterator);
198 tcase_add_test(tc, efl_ui_test_widget_sub_object_add_del); 229 tcase_add_test(tc, efl_ui_test_widget_sub_object_add_del);
230 tcase_add_test(tc, efl_ui_test_widget_sub_object_theme_sync);
199} 231}