summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2018-11-20 15:44:15 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-17 09:12:22 +0100
commitd840a645506d6131331c7e5491dc696880d83a9a (patch)
treef97169c94cdf456525ad7a3e8376d32f721c20d7
parent2df601d589ad405ddb54626d991807be65f74e57 (diff)
elm-test: add a test for checking the focus_next_object_set
The object which is set by elm_object_focus_next_object_set should be considered first when focus moved. ref T7389 Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7310
-rw-r--r--src/tests/elementary/elm_test_spinner.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_spinner.c b/src/tests/elementary/elm_test_spinner.c
index a6da140dda..ca4e1c1d52 100644
--- a/src/tests/elementary/elm_test_spinner.c
+++ b/src/tests/elementary/elm_test_spinner.c
@@ -41,9 +41,42 @@ EFL_START_TEST (elm_atspi_role_get)
41} 41}
42EFL_END_TEST 42EFL_END_TEST
43 43
44
45EFL_START_TEST (elm_spinner_focus_next_object)
46{
47 Evas_Object *win, *box, *spinner, *btn, *o;
48
49 win = win_add(NULL, "spinner", ELM_WIN_BASIC);
50
51 box = elm_box_add(win);
52 elm_win_resize_object_add(win, box);
53 evas_object_show(box);
54
55 spinner = elm_spinner_add(box);
56 elm_box_pack_end(box, spinner);
57 evas_object_show(spinner);
58
59 btn = elm_button_add(box);
60 elm_box_pack_end(box, btn);
61 evas_object_show(btn);
62
63 evas_object_show(win);
64
65 elm_object_focus_set(spinner, EINA_TRUE);
66
67 elm_object_focus_next_object_set(spinner, btn, EFL_UI_FOCUS_DIRECTION_UP);
68 o = elm_object_focus_next_object_get(spinner, EFL_UI_FOCUS_DIRECTION_UP);
69 ck_assert_ptr_eq(o, btn);
70
71 elm_object_focus_next(win, EFL_UI_FOCUS_DIRECTION_UP);
72 ck_assert_ptr_eq(elm_object_focused_object_get(win), btn);
73}
74EFL_END_TEST
75
44void elm_test_spinner(TCase *tc) 76void elm_test_spinner(TCase *tc)
45{ 77{
46 tcase_add_test(tc, elm_spinner_legacy_type_check); 78 tcase_add_test(tc, elm_spinner_legacy_type_check);
47 tcase_add_test(tc, elm_atspi_role_get); 79 tcase_add_test(tc, elm_atspi_role_get);
80 tcase_add_test(tc, elm_spinner_focus_next_object);
48} 81}
49 82