0009_input: Add ecore_wl2_input_seat_get() TCs 76/313676/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 1 Jul 2024 02:53:35 +0000 (11:53 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 1 Jul 2024 02:53:35 +0000 (11:53 +0900)
Change-Id: I35b470a8722963a87654d45139f0bbdffdd62aa9
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index c95a8741ffe42ce0ff28838d045ed91cdfad9616..8b63b05240c75fb23ab544e06ddf798dea2b9063 100644 (file)
@@ -398,6 +398,36 @@ TEST_F(etTestInput, keyboard_grab_null_parameter)
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
 
+TEST_F(etTestInput, seat_get)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *wl2_input = NULL;
+   struct wl_seat *seat = NULL;
+
+   etWin *tw = initNormalWin("TCWin_SeatGet", EINA_FALSE);
+   ASSERT_TRUE(tw != NULL) << "failed to init window";
+
+   showTCWin(tw);
+   ASSERT_VIS_ON(tw);
+
+   wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(tw->elm_win);
+   EINA_SAFETY_ON_NULL_RETURN(wlwin);
+
+   wl2_input = ecore_wl2_window_input_get(wlwin);
+   EINA_SAFETY_ON_NULL_RETURN(wl2_input);
+
+   seat = ecore_wl2_input_seat_get(wl2_input);
+   ASSERT_NE(seat, nullptr);
+}
+
+TEST_F(etTestInput, seat_get_null_input)
+{
+   struct wl_seat *seat = NULL;
+
+   seat = ecore_wl2_input_seat_get(NULL);
+   ASSERT_EQ(seat, nullptr);
+}
+
 TEST_F(etTestInput, seat_capabilities_get)
 {
    Ecore_Wl2_Window *wlwin = NULL;