summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tests/elementary/efl_ui_test_check.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_check.c b/src/tests/elementary/efl_ui_test_check.c
index 232bc7cae5..a013f93f10 100644
--- a/src/tests/elementary/efl_ui_test_check.c
+++ b/src/tests/elementary/efl_ui_test_check.c
@@ -70,6 +70,31 @@ EFL_START_TEST(check_selection_events)
70} 70}
71EFL_END_TEST 71EFL_END_TEST
72 72
73
74EFL_START_TEST(efl_ui_test_check_callbacks)
75{
76 int called = 0;
77 int i;
78
79 efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
80
81 efl_text_set(check, "TEST TEST TEST");
82 efl_event_callback_add(check, EFL_UI_EVENT_SELECTED_CHANGED, (void*)event_callback_single_call_int_data, &called);
83
84 efl_gfx_entity_size_set(check, EINA_SIZE2D(200, 100));
85 get_me_to_those_events(check);
86
87 for (i = 0; i < 4; i++)
88 {
89 called = 0;
90 click_object(check);
91 ecore_main_loop_iterate();
92 ck_assert_int_eq(efl_ui_selectable_selected_get(check), !(i % 2));
93 ck_assert_int_eq(called, 1);
94 }
95}
96EFL_END_TEST
97
73void efl_ui_test_check(TCase *tc) 98void efl_ui_test_check(TCase *tc)
74{ 99{
75 tcase_add_checked_fixture(tc, check_setup, NULL); 100 tcase_add_checked_fixture(tc, check_setup, NULL);
@@ -77,4 +102,5 @@ void efl_ui_test_check(TCase *tc)
77 tcase_add_test(tc, check_text); 102 tcase_add_test(tc, check_text);
78 tcase_add_test(tc, check_content); 103 tcase_add_test(tc, check_content);
79 tcase_add_test(tc, check_selection_events); 104 tcase_add_test(tc, check_selection_events);
105 tcase_add_test(tc, efl_ui_test_check_callbacks);
80} 106}