0009_input: skip pointer_constraints_lock_pointer test in no pointer device 24/312824/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 14 Jun 2024 11:44:43 +0000 (20:44 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 14 Jun 2024 11:45:18 +0000 (20:45 +0900)
Change-Id: I2e3d7ce7396ccf9a94bc990bf02c416ccfb48193
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index 65fa1007bfd4e2bf27b436c502c1976ee3f98dae..86385889bdfe7684c37dcda1dfb35016cbb47d4b 100644 (file)
@@ -442,6 +442,7 @@ TEST_F(etTestInput, pointer_constraints_lock_pointer)
 {
    Ecore_Wl2_Window *wlwin = NULL;
    Eina_Bool ret = EINA_FALSE;
+   Ecore_Wl2_Input *wl2_input = NULL;
 
    etWin *tw = initNormalWin("TCWin_PointerConstraintsLockPointer", EINA_FALSE);
    ASSERT_TRUE(tw != NULL) << "failed to initiation window";
@@ -453,6 +454,17 @@ TEST_F(etTestInput, pointer_constraints_lock_pointer)
    EINA_SAFETY_ON_NULL_RETURN(wlwin);
 
    ret = ecore_wl2_window_pointer_constraints_lock_pointer(wlwin);
+   if (ret == EINA_FALSE)
+   {
+      wl2_input = ecore_wl2_window_input_get(wlwin);
+      EINA_SAFETY_ON_NULL_RETURN(wlwin);
+
+      if (!(ecore_wl2_input_seat_capabilities_get(wl2_input) & ECORE_WL2_SEAT_CAPABILITIES_POINTER))
+      {
+         GTEST_SKIP() << "Skipping pointer_constraints_lock_pointer test";
+      }
+   }
+
    ASSERT_TRUE(ret);
 
    ret = ecore_wl2_window_pointer_constraints_unlock_pointer(wlwin);