0009_input: Add ecore_wl2_window_input_get() TCs 11/314111/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 5 Jul 2024 08:31:09 +0000 (17:31 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 5 Jul 2024 08:32:35 +0000 (17:32 +0900)
Change-Id: I1131cc1eab940198f88cef19f08278f4d44a8de9
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index 0618a1435870def6e7665e7f504939d0086ed1a0..30478453e47bf78da6e7effc86bd2e39c45e0d20 100644 (file)
@@ -1156,6 +1156,34 @@ TEST_F(etTestInput, window_input_rect_set_null_rect)
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
 
+TEST_F(etTestInput, window_input_get)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *wl2_input = NULL;
+
+   etWin *tw = initNormalWin("TCWin_InputGet", 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);
+   ASSERT_NE(wl2_input, nullptr);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestInput, window_input_get_null_window)
+{
+   Ecore_Wl2_Input *wl2_input = NULL;
+
+   wl2_input = ecore_wl2_window_input_get(NULL);
+   ASSERT_EQ(wl2_input, nullptr);
+}
+
 #ifndef DISABLE_GESTURE_TESTS
 TEST_F(etTestInput, gesture_tap22)
 {