summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_test_focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/elementary/elm_test_focus.c')
-rw-r--r--src/tests/elementary/elm_test_focus.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c
index c4e0836..e7b4676 100644
--- a/src/tests/elementary/elm_test_focus.c
+++ b/src/tests/elementary/elm_test_focus.c
@@ -366,6 +366,36 @@ START_TEST(logical_shift)
366} 366}
367END_TEST 367END_TEST
368 368
369START_TEST(root_redirect_chain)
370{
371 Efl_Ui_Focus_Manager *m, *m2;
372
373 elm_init(1, NULL);
374
375 TEST_OBJ_NEW(root, 0, 20, 20, 20);
376 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
377 TEST_OBJ_NEW(child, 0, 20, 20, 20);
378
379 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
380 efl_ui_focus_manager_root_set(efl_added, root)
381 );
382
383 focus_test_manager_set(root2, m);
384
385 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
386 efl_ui_focus_manager_root_set(efl_added, root2)
387 );
388
389 efl_ui_focus_manager_calc_register(m, root2, root, m2);
390 efl_ui_focus_manager_calc_register(m2, child, root2, NULL);
391 efl_ui_focus_manager_focus_set(m2, child);
392
393 ck_assert_ptr_eq(efl_ui_focus_manager_redirect_get(m), m2);
394
395 elm_shutdown();
396}
397END_TEST
398
369void elm_test_focus(TCase *tc) 399void elm_test_focus(TCase *tc)
370{ 400{
371 tcase_add_test(tc, focus_register_twice); 401 tcase_add_test(tc, focus_register_twice);
@@ -379,4 +409,5 @@ void elm_test_focus(TCase *tc)
379 tcase_add_test(tc, invalid_args_check); 409 tcase_add_test(tc, invalid_args_check);
380 tcase_add_test(tc, order_check); 410 tcase_add_test(tc, order_check);
381 tcase_add_test(tc, logical_shift); 411 tcase_add_test(tc, logical_shift);
412 tcase_add_test(tc, root_redirect_chain);
382} 413}