diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2020-03-31 12:58:09 -0400 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-04-03 17:13:50 +0200 |
commit | 6f933e01c708341e09ad6803925dc8e04765a418 (patch) | |
tree | f75553950a767712732b3bf0078e6befaa47bf65 | |
parent | 426967c7781ccb7d5bb0aa3ddfdaa7055dd6a27e (diff) | |
download | efl-6f933e01c708341e09ad6803925dc8e04765a418.tar.gz |
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.c | 21 |
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) } EFL_END_TEST +EFL_START_TEST(efl_ui_layout_test_freeze) +{ + Evas_Object *win; + int count = 0; + + win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC); + efl_gfx_entity_size_set(win, EINA_SIZE2D(100, 100)); + Eo *layout = efl_add(EFL_UI_BUTTON_CLASS, win); + efl_gfx_entity_size_set(layout, EINA_SIZE2D(100, 100)); + efl_text_set(layout, "button"); + get_me_to_those_events(layout); + + efl_event_callback_add(win, EFL_CANVAS_SCENE_EVENT_RENDER_PRE, (void*)event_callback_single_call_int_data, &count); + efl_layout_calc_freeze(layout); + efl_layout_calc_thaw(layout); + force_render(win); + ck_assert_int_eq(count, 0); +} +EFL_END_TEST + void efl_ui_test_layout(TCase *tc) { tcase_add_test(tc, efl_ui_layout_test_property_bind); @@ -234,4 +254,5 @@ void efl_ui_test_layout(TCase *tc) tcase_add_test(tc, efl_ui_layout_test_callback); tcase_add_test(tc, efl_ui_layout_test_property_bind_provider); tcase_add_test(tc, efl_ui_layout_test_versioning); + tcase_add_test(tc, efl_ui_layout_test_freeze); } |