summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-08 10:58:29 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-08 10:58:29 -0500
commit9df48a5a3c47471ad25146888b413f088d5bcf9c (patch)
tree739705a646cee628bdce312b5e7983884d96127c
parenta9ded0ab5c0d463208c5305856107fb27bb73271 (diff)
tests/ecore_wl2: Add test for ecore_wl2_window_popup_input functions
ref T8016
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index 54d7f8bfd9..611b36768c 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -486,6 +486,39 @@ EFL_START_TEST(wl2_window_opaque_region)
486} 486}
487EFL_END_TEST 487EFL_END_TEST
488 488
489EFL_START_TEST(wl2_window_popup_input)
490{
491 Ecore_Wl2_Display *disp;
492 Ecore_Wl2_Window *win;
493 Ecore_Wl2_Input *input;
494 Eina_Iterator *itr;
495
496 disp = _display_connect();
497 ck_assert(disp != NULL);
498
499 win = _window_create(disp);
500 ck_assert(win != NULL);
501
502 ecore_wl2_window_type_set(win, ECORE_WL2_WINDOW_TYPE_MENU);
503
504 itr = ecore_wl2_display_inputs_get(disp);
505 ck_assert(itr != NULL);
506
507 EINA_ITERATOR_FOREACH(itr, input)
508 {
509 if (ecore_wl2_input_seat_capabilities_get(input) !=
510 ECORE_WL2_SEAT_CAPABILITIES_POINTER)
511 continue;
512
513 ecore_wl2_window_popup_input_set(win, input);
514 fail_if(ecore_wl2_window_popup_input_get(win) != input);
515 break;
516 }
517
518 eina_iterator_free(itr);
519}
520EFL_END_TEST
521
489void 522void
490ecore_wl2_test_window(TCase *tc) 523ecore_wl2_test_window(TCase *tc)
491{ 524{
@@ -516,5 +549,6 @@ ecore_wl2_test_window(TCase *tc)
516 tcase_add_test(tc, wl2_window_role); 549 tcase_add_test(tc, wl2_window_role);
517 tcase_add_test(tc, wl2_window_input_region); 550 tcase_add_test(tc, wl2_window_input_region);
518 tcase_add_test(tc, wl2_window_opaque_region); 551 tcase_add_test(tc, wl2_window_opaque_region);
552 tcase_add_test(tc, wl2_window_popup_input);
519 } 553 }
520} 554}