summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
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}