0009_input: Add ecore_wl2_window_input_region_set() TCs 57/314157/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 02:17:25 +0000 (11:17 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 02:17:25 +0000 (11:17 +0900)
Change-Id: Ic12b7084233385196a0de6996aff79aad03f34f8
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index 3e64ad691567967867ce6f4611e3cbb1ea02d2ea..3be025ecca020d3d220044339fc14a187df6f922 100644 (file)
@@ -1283,6 +1283,40 @@ TEST_F(etTestInput, window_pointer_set_null_window)
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
 
+TEST_F(etTestInput, window_input_region_set)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Eina_Bool ret = EINA_TRUE; // intentional
+   int x = 0, y = 0, w = 10, h = 10;
+
+   etWin *tw = initNormalWin("TCWin_WindowInputRegionSet", 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);
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_input_region_set(wlwin, x, y, w, h);
+   ASSERT_TRUE(ret);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestInput, window_input_region_set_null_window)
+{
+   Eina_Bool ret = EINA_TRUE; // intentional
+   int x = 0, y = 0, w = 10, h = 10;
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_input_region_set(NULL, x, y, w, h);
+   ASSERT_TRUE(ret);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
 #ifndef DISABLE_GESTURE_TESTS
 TEST_F(etTestInput, gesture_tap22)
 {