diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-11-26 10:54:36 -0500 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-12-04 16:47:48 +0100 |
commit | d54ba9421431912f4b08a843584ac7584a477f1d (patch) | |
tree | 230738d2a0eba18b791443db919ef547c7e130e3 | |
parent | 8729c4b0b5f99e1ca1d4e616a06cad687a08c758 (diff) | |
download | efl-d54ba9421431912f4b08a843584ac7584a477f1d.tar.gz |
tests/layout: validate EFL_UI_LAYOUT_EVENT_THEME_CHANGED emission in theme test
ensure that this callback is emitted exactly one time if the theme is
set during construction
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10740
-rw-r--r-- | src/tests/elementary/efl_ui_test_layout.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c index 6a1763f620..fc7a3b969c 100644 --- a/src/tests/elementary/efl_ui_test_layout.c +++ b/src/tests/elementary/efl_ui_test_layout.c @@ -154,9 +154,11 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme) Evas_Object *win; const char *klass, *group, *style; Eina_Error err; + int called = 0; win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC); Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win, + efl_event_callback_add(efl_added, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, (void*)event_callback_single_call_int_data, &called), err = efl_ui_layout_theme_set(efl_added, "button", NULL, "anchor") ); ck_assert_int_eq(err, 0); @@ -164,6 +166,7 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme) ck_assert_str_eq(klass, "button"); ck_assert(!group); ck_assert_str_eq(style, "anchor"); + ck_assert_int_eq(called, 1); } EFL_END_TEST |