forked from enlightenment/efl
tests: move efl_ui focus tests into efl_ui_suite
ref T6815 Differential Revision: https://phab.enlightenment.org/D7827
This commit is contained in:
parent
08875e5e42
commit
dc8e46a926
|
@ -1581,10 +1581,6 @@ tests_elementary_elm_suite_SOURCES = \
|
||||||
tests/elementary/elm_code_test_widget_text.c \
|
tests/elementary/elm_code_test_widget_text.c \
|
||||||
tests/elementary/elm_code_test_widget_selection.c \
|
tests/elementary/elm_code_test_widget_selection.c \
|
||||||
tests/elementary/elm_code_test_widget_undo.c \
|
tests/elementary/elm_code_test_widget_undo.c \
|
||||||
tests/elementary/elm_test_focus_common.c \
|
|
||||||
tests/elementary/elm_test_focus_common.h \
|
|
||||||
tests/elementary/elm_test_focus.c \
|
|
||||||
tests/elementary/elm_test_focus_sub.c \
|
|
||||||
tests/elementary/elm_test_widget_focus.c
|
tests/elementary/elm_test_widget_focus.c
|
||||||
|
|
||||||
tests_elementary_elm_suite_CPPFLAGS = \
|
tests_elementary_elm_suite_CPPFLAGS = \
|
||||||
|
@ -1609,6 +1605,10 @@ tests_elementary_efl_ui_suite_SOURCES = \
|
||||||
tests/elementary/efl_ui_suite.c \
|
tests/elementary/efl_ui_suite.c \
|
||||||
tests/elementary/elm_test_init.c \
|
tests/elementary/elm_test_init.c \
|
||||||
tests/elementary/efl_ui_test_atspi.c \
|
tests/elementary/efl_ui_test_atspi.c \
|
||||||
|
tests/elementary/efl_ui_test_focus_common.c \
|
||||||
|
tests/elementary/efl_ui_test_focus_common.h \
|
||||||
|
tests/elementary/efl_ui_test_focus.c \
|
||||||
|
tests/elementary/efl_ui_test_focus_sub.c \
|
||||||
tests/elementary/efl_ui_test_grid.c \
|
tests/elementary/efl_ui_test_grid.c \
|
||||||
tests/elementary/efl_ui_test_image.c \
|
tests/elementary/efl_ui_test_image.c \
|
||||||
tests/elementary/efl_ui_test_image_zoomable.c \
|
tests/elementary/efl_ui_test_image_zoomable.c \
|
||||||
|
|
|
@ -13,6 +13,8 @@ static const Efl_Test_Case etc[] = {
|
||||||
//{ "elm_focus_sub", elm_test_focus_sub},
|
//{ "elm_focus_sub", elm_test_focus_sub},
|
||||||
//{ "elm_widget_focus", elm_test_widget_focus},
|
//{ "elm_widget_focus", elm_test_widget_focus},
|
||||||
{ "efl_ui_atspi", efl_ui_test_atspi},
|
{ "efl_ui_atspi", efl_ui_test_atspi},
|
||||||
|
{ "efl_ui_focus", efl_ui_test_focus},
|
||||||
|
{ "efl_ui_focus_sub", efl_ui_test_focus_sub},
|
||||||
{ "efl_ui_grid", efl_ui_test_grid},
|
{ "efl_ui_grid", efl_ui_test_grid},
|
||||||
{ "efl_ui_image", efl_ui_test_image},
|
{ "efl_ui_image", efl_ui_test_image},
|
||||||
{ "efl_ui_image_zoomable", efl_ui_test_image_zoomable},
|
{ "efl_ui_image_zoomable", efl_ui_test_image_zoomable},
|
||||||
|
|
|
@ -22,6 +22,9 @@ void efl_ui_test_image_zoomable(TCase *tc);
|
||||||
void efl_ui_test_layout(TCase *tc);
|
void efl_ui_test_layout(TCase *tc);
|
||||||
void efl_ui_test_image(TCase *tc);
|
void efl_ui_test_image(TCase *tc);
|
||||||
|
|
||||||
|
void efl_ui_test_focus(TCase *tc);
|
||||||
|
void efl_ui_test_focus_sub(TCase *tc);
|
||||||
|
|
||||||
Eo *win_add();
|
Eo *win_add();
|
||||||
Eo *win_add_focused();
|
Eo *win_add_focused();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "elm_test_focus_common.h"
|
#include "efl_ui_test_focus_common.h"
|
||||||
|
|
||||||
EFL_START_TEST(focus_unregister_twice)
|
EFL_START_TEST(focus_unregister_twice)
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,8 @@ EFL_END_TEST
|
||||||
|
|
||||||
EFL_START_TEST(focus_register_twice)
|
EFL_START_TEST(focus_register_twice)
|
||||||
{
|
{
|
||||||
Efl_Ui_Focus_Object *r1 = elm_focus_test_object_new("r1", 0, 0, 10, 10);
|
Efl_Ui_Focus_Object *r1 = focus_test_object_new("r1", 0, 0, 10, 10);
|
||||||
Efl_Ui_Focus_Object *r2 = elm_focus_test_object_new("r2", 0, 10, 10, 10);
|
Efl_Ui_Focus_Object *r2 = focus_test_object_new("r2", 0, 10, 10, 10);
|
||||||
|
|
||||||
Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
|
Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
|
||||||
efl_ui_focus_manager_root_set(efl_added, r1)
|
efl_ui_focus_manager_root_set(efl_added, r1)
|
||||||
|
@ -48,9 +48,9 @@ EFL_START_TEST(pos_check)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *middle, *east, *west, *north, *south, *root;
|
Efl_Ui_Focus_Object *middle, *east, *west, *north, *south, *root;
|
||||||
|
|
||||||
elm_focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
||||||
|
@ -115,14 +115,14 @@ EFL_START_TEST(pos_check2)
|
||||||
Efl_Ui_Focus_Relations *rel;
|
Efl_Ui_Focus_Relations *rel;
|
||||||
Efl_Ui_Focus_Object *root, *middle, *north_east, *north_west, *south_east, *south_west;
|
Efl_Ui_Focus_Object *root, *middle, *north_east, *north_west, *south_east, *south_west;
|
||||||
|
|
||||||
middle = elm_focus_test_object_new("middle", 40, 40, 5, 5);
|
middle = focus_test_object_new("middle", 40, 40, 5, 5);
|
||||||
|
|
||||||
north_east = elm_focus_test_object_new("north_east", 60, 20, 5, 5);
|
north_east = focus_test_object_new("north_east", 60, 20, 5, 5);
|
||||||
north_west = elm_focus_test_object_new("north_west", 20, 20, 5, 5);
|
north_west = focus_test_object_new("north_west", 20, 20, 5, 5);
|
||||||
south_east = elm_focus_test_object_new("south_east", 60, 60, 5, 5);
|
south_east = focus_test_object_new("south_east", 60, 60, 5, 5);
|
||||||
south_west = elm_focus_test_object_new("south_west", 20, 60, 5, 5);
|
south_west = focus_test_object_new("south_west", 20, 60, 5, 5);
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, north_east, root, NULL);
|
efl_ui_focus_manager_calc_register(m, north_east, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, north_west, root, NULL);
|
efl_ui_focus_manager_calc_register(m, north_west, root, NULL);
|
||||||
|
@ -190,9 +190,9 @@ EFL_START_TEST(border_check)
|
||||||
Eina_Iterator *iter;
|
Eina_Iterator *iter;
|
||||||
Efl_Ui_Focus_Object *obj;
|
Efl_Ui_Focus_Object *obj;
|
||||||
|
|
||||||
elm_focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
||||||
|
@ -226,7 +226,7 @@ EFL_START_TEST(logical_chain)
|
||||||
|
|
||||||
TEST_OBJ_NEW(root, 0, 0, 20, 20);
|
TEST_OBJ_NEW(root, 0, 0, 20, 20);
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&lroot);
|
m = focus_test_manager_new(&lroot);
|
||||||
|
|
||||||
fail_if(!m);
|
fail_if(!m);
|
||||||
|
|
||||||
|
@ -328,19 +328,19 @@ EFL_START_TEST(logical_chain_multi_redirect)
|
||||||
Efl_Ui_Focus_Manager *m, *m2, *m3, *m4;
|
Efl_Ui_Focus_Manager *m, *m2, *m3, *m4;
|
||||||
Efl_Ui_Focus_Object *root,*root2, *root3, *root4, *c1_1, *c1_2, *c1_3, *c2, *c3, *c4;
|
Efl_Ui_Focus_Object *root,*root2, *root3, *root4, *c1_1, *c1_2, *c1_3, *c2, *c3, *c4;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
m2 = elm_focus_test_manager_new(&root2);
|
m2 = focus_test_manager_new(&root2);
|
||||||
m3 = elm_focus_test_manager_new(&root3);
|
m3 = focus_test_manager_new(&root3);
|
||||||
m4 = elm_focus_test_manager_new(&root4);
|
m4 = focus_test_manager_new(&root4);
|
||||||
c1_1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1_1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c1_2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c1_2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c1_3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c1_3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
focus_test_manager_set(c1_1, m2);
|
focus_test_manager_set(c1_1, m2);
|
||||||
focus_test_manager_set(c1_2, m3);
|
focus_test_manager_set(c1_2, m3);
|
||||||
focus_test_manager_set(c1_3, m4);
|
focus_test_manager_set(c1_3, m4);
|
||||||
c2 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c3 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c4 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c4 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
|
|
||||||
Efl_Ui_Focus_Object *objects[] = {c2, c3, c4, NULL};
|
Efl_Ui_Focus_Object *objects[] = {c2, c3, c4, NULL};
|
||||||
|
|
||||||
|
@ -364,15 +364,15 @@ EFL_START_TEST(logical_chain_single_redirect)
|
||||||
Efl_Ui_Focus_Manager *m, *m2;
|
Efl_Ui_Focus_Manager *m, *m2;
|
||||||
Efl_Ui_Focus_Object *root,*root2, *c1_1, *c1_2, *c1_3, *c2_1, *c2_2, *c2_3;
|
Efl_Ui_Focus_Object *root,*root2, *c1_1, *c1_2, *c1_3, *c2_1, *c2_2, *c2_3;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
m2 = elm_focus_test_manager_new(&root2);
|
m2 = focus_test_manager_new(&root2);
|
||||||
c1_1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1_1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c1_2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c1_2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
focus_test_manager_set(c1_2, m2);
|
focus_test_manager_set(c1_2, m2);
|
||||||
c1_3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c1_3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
c2_1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c2_1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2_2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2_2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c2_3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c2_3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
|
|
||||||
Efl_Ui_Focus_Object *objects[] = {c1_1, c2_1, c2_2, c2_3, c1_3, NULL};
|
Efl_Ui_Focus_Object *objects[] = {c1_1, c2_1, c2_2, c2_3, c1_3, NULL};
|
||||||
|
|
||||||
|
@ -701,7 +701,7 @@ EFL_START_TEST(test_request_subchild_empty)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root;
|
Efl_Ui_Focus_Object *root;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
|
|
||||||
ck_assert_ptr_eq(efl_ui_focus_manager_request_subchild(m, root), NULL);
|
ck_assert_ptr_eq(efl_ui_focus_manager_request_subchild(m, root), NULL);
|
||||||
|
|
||||||
|
@ -714,8 +714,8 @@ EFL_START_TEST(test_request_subchild_one_element)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1;
|
Efl_Ui_Focus_Object *root, *c1;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
|
|
||||||
ck_assert_ptr_eq(efl_ui_focus_manager_request_subchild(m, root), c1);
|
ck_assert_ptr_eq(efl_ui_focus_manager_request_subchild(m, root), c1);
|
||||||
|
@ -730,9 +730,9 @@ EFL_START_TEST(test_request_subchild_child_alongside)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2;
|
Efl_Ui_Focus_Object *root, *c1, *c2;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
||||||
|
|
||||||
|
@ -749,9 +749,9 @@ EFL_START_TEST(test_request_subchild_child_logical_regular)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2;
|
Efl_Ui_Focus_Object *root, *c1, *c2;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register_logical(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register_logical(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, c1, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, c1, NULL);
|
||||||
|
|
||||||
|
@ -768,9 +768,9 @@ EFL_START_TEST(test_request_subchild_child_regular_regular)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2;
|
Efl_Ui_Focus_Object *root, *c1, *c2;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, c1, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, c1, NULL);
|
||||||
|
|
||||||
|
@ -787,10 +787,10 @@ EFL_START_TEST(test_unregister_last_focused_no_history)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
||||||
|
@ -810,10 +810,10 @@ EFL_START_TEST(test_unregister_last_focused)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
||||||
|
@ -835,8 +835,8 @@ EFL_START_TEST(test_unregister_last_focused_no_child)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1;
|
Efl_Ui_Focus_Object *root, *c1;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
|
|
||||||
efl_ui_focus_manager_focus_set(m, c1);
|
efl_ui_focus_manager_focus_set(m, c1);
|
||||||
|
@ -853,10 +853,10 @@ EFL_START_TEST(test_pop_history_element)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
Efl_Ui_Focus_Object *root, *c1, *c2, *c3;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c2, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c3, root, NULL);
|
||||||
|
@ -902,13 +902,13 @@ EFL_START_TEST(test_request_move)
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
Efl_Ui_Focus_Object *root, *c1, *c2, *c3, *c4, *c5, *c6;
|
Efl_Ui_Focus_Object *root, *c1, *c2, *c3, *c4, *c5, *c6;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
c3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
c4 = elm_focus_test_object_new("child4", 0, 0, 20, 20);
|
c4 = focus_test_object_new("child4", 0, 0, 20, 20);
|
||||||
c5 = elm_focus_test_object_new("child5", 0, 0, 20, 20);
|
c5 = focus_test_object_new("child5", 0, 0, 20, 20);
|
||||||
c6 = elm_focus_test_object_new("child6", 0, 0, 20, 20);
|
c6 = focus_test_object_new("child6", 0, 0, 20, 20);
|
||||||
|
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register_logical(m, c2, root, NULL);
|
efl_ui_focus_manager_calc_register_logical(m, c2, root, NULL);
|
||||||
|
@ -985,18 +985,18 @@ EFL_START_TEST(test_events_child_focus)
|
||||||
Eina_Bool froot = EINA_FALSE, fc1 = EINA_FALSE, fc2 = EINA_FALSE,
|
Eina_Bool froot = EINA_FALSE, fc1 = EINA_FALSE, fc2 = EINA_FALSE,
|
||||||
fc3 = EINA_FALSE, fc4 = EINA_FALSE, fc5 = EINA_FALSE, fc6 = EINA_FALSE;
|
fc3 = EINA_FALSE, fc4 = EINA_FALSE, fc5 = EINA_FALSE, fc6 = EINA_FALSE;
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
c1 = elm_focus_test_object_new("child1", 0, 0, 20, 20);
|
c1 = focus_test_object_new("child1", 0, 0, 20, 20);
|
||||||
efl_parent_set(c1, root);
|
efl_parent_set(c1, root);
|
||||||
c2 = elm_focus_test_object_new("child2", 0, 0, 20, 20);
|
c2 = focus_test_object_new("child2", 0, 0, 20, 20);
|
||||||
efl_parent_set(c2, root);
|
efl_parent_set(c2, root);
|
||||||
c3 = elm_focus_test_object_new("child3", 0, 0, 20, 20);
|
c3 = focus_test_object_new("child3", 0, 0, 20, 20);
|
||||||
efl_parent_set(c3, c2);
|
efl_parent_set(c3, c2);
|
||||||
c4 = elm_focus_test_object_new("child4", 0, 0, 20, 20);
|
c4 = focus_test_object_new("child4", 0, 0, 20, 20);
|
||||||
efl_parent_set(c4, c2);
|
efl_parent_set(c4, c2);
|
||||||
c5 = elm_focus_test_object_new("child5", 0, 0, 20, 20);
|
c5 = focus_test_object_new("child5", 0, 0, 20, 20);
|
||||||
efl_parent_set(c5, root);
|
efl_parent_set(c5, root);
|
||||||
c6 = elm_focus_test_object_new("child6", 0, 0, 20, 20);
|
c6 = focus_test_object_new("child6", 0, 0, 20, 20);
|
||||||
efl_parent_set(c6, c5);
|
efl_parent_set(c6, c5);
|
||||||
|
|
||||||
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
efl_ui_focus_manager_calc_register(m, c1, root, NULL);
|
||||||
|
@ -1085,9 +1085,9 @@ EFL_START_TEST(viewport_check)
|
||||||
Eina_Iterator *iter;
|
Eina_Iterator *iter;
|
||||||
Efl_Ui_Focus_Object *obj;
|
Efl_Ui_Focus_Object *obj;
|
||||||
|
|
||||||
elm_focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
focus_test_setup_cross(&middle, &south, &north, &east, &west);
|
||||||
|
|
||||||
m = elm_focus_test_manager_new(&root);
|
m = focus_test_manager_new(&root);
|
||||||
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
efl_ui_focus_manager_calc_register(m, middle, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
efl_ui_focus_manager_calc_register(m, south, root, NULL);
|
||||||
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
efl_ui_focus_manager_calc_register(m, north, root, NULL);
|
||||||
|
@ -1108,7 +1108,7 @@ EFL_START_TEST(viewport_check)
|
||||||
}
|
}
|
||||||
EFL_END_TEST
|
EFL_END_TEST
|
||||||
|
|
||||||
void elm_test_focus(TCase *tc)
|
void efl_ui_test_focus(TCase *tc)
|
||||||
{
|
{
|
||||||
tcase_add_test(tc, focus_register_twice);
|
tcase_add_test(tc, focus_register_twice);
|
||||||
tcase_add_test(tc, focus_unregister_twice);
|
tcase_add_test(tc, focus_unregister_twice);
|
|
@ -1,6 +1,6 @@
|
||||||
#define EFL_UI_FOCUS_OBJECT_PROTECTED
|
#define EFL_UI_FOCUS_OBJECT_PROTECTED
|
||||||
|
|
||||||
#include "elm_test_focus_common.h"
|
#include "efl_ui_test_focus_common.h"
|
||||||
|
|
||||||
#define Q(o,_x,_y,_w,_h) \
|
#define Q(o,_x,_y,_w,_h) \
|
||||||
do {\
|
do {\
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
Efl_Ui_Focus_Object*
|
Efl_Ui_Focus_Object*
|
||||||
elm_focus_test_object_new(const char *name, int x, int y, int w, int h)
|
focus_test_object_new(const char *name, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
Efl_Ui_Focus_Object *ret;
|
Efl_Ui_Focus_Object *ret;
|
||||||
|
|
||||||
|
@ -26,28 +26,28 @@ elm_focus_test_object_new(const char *name, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
elm_focus_test_setup_cross(Efl_Ui_Focus_Object **middle,
|
focus_test_setup_cross(Efl_Ui_Focus_Object **middle,
|
||||||
Efl_Ui_Focus_Object **south,
|
Efl_Ui_Focus_Object **south,
|
||||||
Efl_Ui_Focus_Object **north,
|
Efl_Ui_Focus_Object **north,
|
||||||
Efl_Ui_Focus_Object **east,
|
Efl_Ui_Focus_Object **east,
|
||||||
Efl_Ui_Focus_Object **west)
|
Efl_Ui_Focus_Object **west)
|
||||||
{
|
{
|
||||||
|
|
||||||
*middle = elm_focus_test_object_new("middle", 40, 40, 20, 20);
|
*middle = focus_test_object_new("middle", 40, 40, 20, 20);
|
||||||
*south = elm_focus_test_object_new("south", 40, 80, 20, 20);
|
*south = focus_test_object_new("south", 40, 80, 20, 20);
|
||||||
*north = elm_focus_test_object_new("north", 40, 0, 20, 20);
|
*north = focus_test_object_new("north", 40, 0, 20, 20);
|
||||||
*east = elm_focus_test_object_new("east", 80, 40, 20, 20);
|
*east = focus_test_object_new("east", 80, 40, 20, 20);
|
||||||
*west = elm_focus_test_object_new("west", 0, 40, 20, 20);
|
*west = focus_test_object_new("west", 0, 40, 20, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Efl_Ui_Focus_Manager*
|
Efl_Ui_Focus_Manager*
|
||||||
elm_focus_test_manager_new(Efl_Ui_Focus_Object **middle)
|
focus_test_manager_new(Efl_Ui_Focus_Object **middle)
|
||||||
{
|
{
|
||||||
Efl_Ui_Focus_Object *root;
|
Efl_Ui_Focus_Object *root;
|
||||||
Efl_Ui_Focus_Manager *m;
|
Efl_Ui_Focus_Manager *m;
|
||||||
|
|
||||||
root = elm_focus_test_object_new("middle", 40, 40, 20, 20);
|
root = focus_test_object_new("middle", 40, 40, 20, 20);
|
||||||
m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
|
m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
|
||||||
efl_ui_focus_manager_root_set(efl_added, root)
|
efl_ui_focus_manager_root_set(efl_added, root)
|
||||||
);
|
);
|
|
@ -1,29 +1,28 @@
|
||||||
#ifndef ELM_TEST_FOCUS_COMMON_H
|
#ifndef ELM_TEST_FOCUS_COMMON_H
|
||||||
#define ELM_TEST_FOCUS_COMMON_H
|
#define ELM_TEST_FOCUS_COMMON_H
|
||||||
|
#define EFL_NOLEGACY_API_SUPPORT
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "elementary_config.h"
|
# include "elementary_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EFL_ACCESS_OBJECT_PROTECTED
|
#define EFL_ACCESS_OBJECT_PROTECTED
|
||||||
|
|
||||||
#include <Elementary.h>
|
#include <Efl_Ui.h>
|
||||||
#include "elm_suite.h"
|
#include "efl_ui_suite.h"
|
||||||
#include "elm_widget.h"
|
|
||||||
#include "focus_test.eo.h"
|
#include "focus_test.eo.h"
|
||||||
|
|
||||||
#define TEST_OBJ_NEW(name, x, y, w, h) \
|
#define TEST_OBJ_NEW(name, x, y, w, h) \
|
||||||
Efl_Ui_Focus_Object* name; \
|
Efl_Ui_Focus_Object* name; \
|
||||||
name = elm_focus_test_object_new("" #name "",x, y, w, h); \
|
name = focus_test_object_new("" #name "",x, y, w, h); \
|
||||||
|
|
||||||
|
|
||||||
Efl_Ui_Focus_Object* elm_focus_test_object_new(const char *name, int x, int y, int w, int h);
|
Efl_Ui_Focus_Object* focus_test_object_new(const char *name, int x, int y, int w, int h);
|
||||||
|
|
||||||
void elm_focus_test_setup_cross(Efl_Ui_Focus_Object **middle,
|
void focus_test_setup_cross(Efl_Ui_Focus_Object **middle,
|
||||||
Efl_Ui_Focus_Object **south,
|
Efl_Ui_Focus_Object **south,
|
||||||
Efl_Ui_Focus_Object **north,
|
Efl_Ui_Focus_Object **north,
|
||||||
Efl_Ui_Focus_Object **east,
|
Efl_Ui_Focus_Object **east,
|
||||||
Efl_Ui_Focus_Object **west);
|
Efl_Ui_Focus_Object **west);
|
||||||
|
|
||||||
Efl_Ui_Focus_Manager *elm_focus_test_manager_new(Efl_Ui_Focus_Object **middle);
|
Efl_Ui_Focus_Manager *focus_test_manager_new(Efl_Ui_Focus_Object **middle);
|
||||||
#endif
|
#endif
|
|
@ -1,4 +1,4 @@
|
||||||
#include "elm_test_focus_common.h"
|
#include "efl_ui_test_focus_common.h"
|
||||||
#include "focus_test_sub_main.eo.h"
|
#include "focus_test_sub_main.eo.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -231,7 +231,7 @@ EFL_START_TEST(correct_un_register)
|
||||||
}
|
}
|
||||||
EFL_END_TEST
|
EFL_END_TEST
|
||||||
|
|
||||||
void elm_test_focus_sub(TCase *tc)
|
void efl_ui_test_focus_sub(TCase *tc)
|
||||||
{
|
{
|
||||||
tcase_add_test(tc, correct_register);
|
tcase_add_test(tc, correct_register);
|
||||||
tcase_add_test(tc, correct_unregister);
|
tcase_add_test(tc, correct_unregister);
|
|
@ -83,8 +83,6 @@ static const Efl_Test_Case etc[] = {
|
||||||
{ "elm_code_widget_text", elm_code_test_widget_text },
|
{ "elm_code_widget_text", elm_code_test_widget_text },
|
||||||
{ "elm_code_widget_selection", elm_code_test_widget_selection },
|
{ "elm_code_widget_selection", elm_code_test_widget_selection },
|
||||||
{ "elm_code_widget_undo", elm_code_test_widget_undo },
|
{ "elm_code_widget_undo", elm_code_test_widget_undo },
|
||||||
{ "elm_focus", elm_test_focus},
|
|
||||||
{ "elm_focus_sub", elm_test_focus_sub},
|
|
||||||
{ "elm_widget_focus", elm_test_widget_focus},
|
{ "elm_widget_focus", elm_test_widget_focus},
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,8 +81,6 @@ void elm_test_panes(TCase *tc);
|
||||||
void elm_test_slideshow(TCase *tc);
|
void elm_test_slideshow(TCase *tc);
|
||||||
void elm_test_spinner(TCase *tc);
|
void elm_test_spinner(TCase *tc);
|
||||||
void elm_test_plug(TCase *tc);
|
void elm_test_plug(TCase *tc);
|
||||||
void elm_test_focus(TCase *tc);
|
|
||||||
void elm_test_focus_sub(TCase *tc);
|
|
||||||
void elm_test_widget_focus(TCase *tc);
|
void elm_test_widget_focus(TCase *tc);
|
||||||
|
|
||||||
void elm_code_file_test_load(TCase *tc);
|
void elm_code_file_test_load(TCase *tc);
|
||||||
|
|
|
@ -97,15 +97,11 @@ elementary_suite_src = [
|
||||||
'elm_code_test_widget_text.c',
|
'elm_code_test_widget_text.c',
|
||||||
'elm_code_test_widget_selection.c',
|
'elm_code_test_widget_selection.c',
|
||||||
'elm_code_test_widget_undo.c',
|
'elm_code_test_widget_undo.c',
|
||||||
'elm_test_focus_common.c',
|
|
||||||
'elm_test_focus_common.h',
|
|
||||||
'elm_test_focus.c',
|
|
||||||
'elm_test_focus_sub.c',
|
|
||||||
'elm_test_widget_focus.c'
|
'elm_test_widget_focus.c'
|
||||||
]
|
]
|
||||||
|
|
||||||
elementary_suite = executable('elementary_suite',
|
elementary_suite = executable('elementary_suite',
|
||||||
elementary_suite_src, priv_eo_file_target,
|
elementary_suite_src,
|
||||||
dependencies: [check, eina, elementary, elementary_deps],
|
dependencies: [check, eina, elementary, elementary_deps],
|
||||||
include_directories : [config_dir] + [elementary_config_dir],
|
include_directories : [config_dir] + [elementary_config_dir],
|
||||||
c_args : [
|
c_args : [
|
||||||
|
@ -121,6 +117,10 @@ efl_ui_suite_src = [
|
||||||
'suite_helpers.c',
|
'suite_helpers.c',
|
||||||
'elm_test_init.c',
|
'elm_test_init.c',
|
||||||
'efl_ui_test_atspi.c',
|
'efl_ui_test_atspi.c',
|
||||||
|
'efl_ui_test_focus_common.c',
|
||||||
|
'efl_ui_test_focus_common.h',
|
||||||
|
'efl_ui_test_focus.c',
|
||||||
|
'efl_ui_test_focus_sub.c',
|
||||||
'efl_ui_test_grid.c',
|
'efl_ui_test_grid.c',
|
||||||
'efl_ui_test_image.c',
|
'efl_ui_test_image.c',
|
||||||
'efl_ui_test_image_zoomable.c',
|
'efl_ui_test_image_zoomable.c',
|
||||||
|
|
Loading…
Reference in New Issue