0009_input: Add ecore_wl2_window_popup_input_set() TCs 61/314161/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 02:54:09 +0000 (11:54 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 04:19:37 +0000 (13:19 +0900)
[----------] 95 tests from etTestInput (47411 ms total)

[----------] Global test environment tear-down
[==========] 95 tests from 1 test suite ran. (47412 ms total)
[  PASSED  ] 95 tests.

Change-Id: I51f46a6f58f0865c3da6d289d4961b9dc547f54b
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index b57244d168487c4f0705b1e1b4b3cf57bdd4212b..39bec1ab122f759dd7f8a3b7051c6722ea54e2a2 100644 (file)
@@ -1385,6 +1385,80 @@ TEST_F(etTestInput, window_input_region_get_null_position)
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
 
+TEST_F(etTestInput, window_popup_input_set)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *input;
+
+   etWin *tw = initNormalWin("TCWin_WindowPopupInputSet", 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);
+
+   input = ecore_wl2_window_input_get(wlwin);
+   EINA_SAFETY_ON_NULL_RETURN(input);
+
+   ecore_wl2_window_type_set(wlwin, ECORE_WL2_WINDOW_TYPE_MENU);
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_popup_input_set(wlwin, input);
+   ASSERT_EQ(ecore_wl2_window_popup_input_get(wlwin), input);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestInput, window_popup_input_set_null_window)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *input;
+
+   etWin *tw = initNormalWin("TCWin_WindowPopupInputSet", 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);
+
+   input = ecore_wl2_window_input_get(wlwin);
+   EINA_SAFETY_ON_NULL_RETURN(input);
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_popup_input_set(NULL, input);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestInput, window_popup_input_set_null_input)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *input;
+
+   etWin *tw = initNormalWin("TCWin_WindowPopupInputSet", 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);
+
+   input = ecore_wl2_window_input_get(wlwin);
+   EINA_SAFETY_ON_NULL_RETURN(input);
+
+   ecore_wl2_window_type_set(wlwin, ECORE_WL2_WINDOW_TYPE_MENU);
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_popup_input_set(wlwin, NULL);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
 #ifndef DISABLE_GESTURE_TESTS
 TEST_F(etTestInput, gesture_tap22)
 {