summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-31 12:58:09 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-03 17:13:50 +0200
commit6f933e01c708341e09ad6803925dc8e04765a418 (patch)
treef75553950a767712732b3bf0078e6befaa47bf65
parent426967c7781ccb7d5bb0aa3ddfdaa7055dd6a27e (diff)
tests/layout: add explicit test for freeze and thaw no-op correctness
this shouldn't trigger any canvas changes since nothing is happening during the freeze Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11631
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c
index 4d6e7c848b..4e1b117b6c 100644
--- a/src/tests/elementary/efl_ui_test_layout.c
+++ b/src/tests/elementary/efl_ui_test_layout.c
@@ -223,6 +223,26 @@ EFL_START_TEST(efl_ui_layout_test_versioning)
223} 223}
224EFL_END_TEST 224EFL_END_TEST
225 225
226EFL_START_TEST(efl_ui_layout_test_freeze)
227{
228 Evas_Object *win;
229 int count = 0;
230
231 win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
232 efl_gfx_entity_size_set(win, EINA_SIZE2D(100, 100));
233 Eo *layout = efl_add(EFL_UI_BUTTON_CLASS, win);
234 efl_gfx_entity_size_set(layout, EINA_SIZE2D(100, 100));
235 efl_text_set(layout, "button");
236 get_me_to_those_events(layout);
237
238 efl_event_callback_add(win, EFL_CANVAS_SCENE_EVENT_RENDER_PRE, (void*)event_callback_single_call_int_data, &count);
239 efl_layout_calc_freeze(layout);
240 efl_layout_calc_thaw(layout);
241 force_render(win);
242 ck_assert_int_eq(count, 0);
243}
244EFL_END_TEST
245
226void efl_ui_test_layout(TCase *tc) 246void efl_ui_test_layout(TCase *tc)
227{ 247{
228 tcase_add_test(tc, efl_ui_layout_test_property_bind); 248 tcase_add_test(tc, efl_ui_layout_test_property_bind);
@@ -234,4 +254,5 @@ void efl_ui_test_layout(TCase *tc)
234 tcase_add_test(tc, efl_ui_layout_test_callback); 254 tcase_add_test(tc, efl_ui_layout_test_callback);
235 tcase_add_test(tc, efl_ui_layout_test_property_bind_provider); 255 tcase_add_test(tc, efl_ui_layout_test_property_bind_provider);
236 tcase_add_test(tc, efl_ui_layout_test_versioning); 256 tcase_add_test(tc, efl_ui_layout_test_versioning);
257 tcase_add_test(tc, efl_ui_layout_test_freeze);
237} 258}