diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2024-07-05 13:14:28 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2024-07-05 13:14:28 +0900 |
commit | 2437d621a85a5020a56576f2d35642b090c859f7 (patch) | |
tree | e1a91a9f1260ef711ed93d833252ae6a6d532d99 | |
parent | 292fe71dd82e7aa1c8726aef53890866a6894bb6 (diff) | |
download | e-tizen-testcase-2437d621a85a5020a56576f2d35642b090c859f7.tar.gz e-tizen-testcase-2437d621a85a5020a56576f2d35642b090c859f7.tar.bz2 e-tizen-testcase-2437d621a85a5020a56576f2d35642b090c859f7.zip |
0009_input: Add display_inputs_get and window_input_rect_set TCs
Change-Id: Ib4a7e185ab5c7d1d21fa0e7442bcb75ed09b4f10
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
-rw-r--r-- | src/testcase/0009_input.cpp | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/testcase/0009_input.cpp b/src/testcase/0009_input.cpp index 75d4913..0618a14 100644 --- a/src/testcase/0009_input.cpp +++ b/src/testcase/0009_input.cpp @@ -1077,6 +1077,85 @@ TEST_F(etTestInput, mouse_wheel_down) ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); } +TEST_F(etTestInput, display_inputs_get) +{ + Ecore_Wl2_Display *display = NULL; + Eina_Iterator *iter = NULL; + + display = ecore_wl2_connected_display_get(NULL); + EINA_SAFETY_ON_NULL_RETURN(display); + + iter = ecore_wl2_display_inputs_get(display); + ASSERT_NE(iter, nullptr); + + ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); +} + +TEST_F(etTestInput, display_inputs_get_null_display) +{ + Eina_Iterator *iter = NULL; + + iter = ecore_wl2_display_inputs_get(NULL); + ASSERT_EQ(iter, nullptr); + + ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); +} + +TEST_F(etTestInput, window_input_rect_set) +{ + Ecore_Wl2_Window *wlwin = NULL; + Eina_Rectangle input_rect = { 0, 0, 100, 100}; + Eina_Bool ret = EINA_TRUE; // intentional + + etWin *tw = initNormalWin("TCWin_InputRectSet", 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 E20 crash + ecore_wl2_window_input_rect_set(wlwin, &input_rect); + ASSERT_TRUE(ret); + + ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); +} + +TEST_F(etTestInput, window_input_rect_set_null_window) +{ + Eina_Rectangle input_rect = { 0, 0, 100, 100}; + Eina_Bool ret = EINA_TRUE; // intentional + + // return void, so just for coverage and checking E20 crash + ecore_wl2_window_input_rect_set(NULL, &input_rect); + ASSERT_TRUE(ret); + + ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); +} + +TEST_F(etTestInput, window_input_rect_set_null_rect) +{ + Ecore_Wl2_Window *wlwin = NULL; + Eina_Bool ret = EINA_TRUE; // intentional + + etWin *tw = initNormalWin("TCWin_InputRectSet", 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 E20 crash + ecore_wl2_window_input_rect_set(wlwin, NULL); + ASSERT_TRUE(ret); + + ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE); +} + #ifndef DISABLE_GESTURE_TESTS TEST_F(etTestInput, gesture_tap22) { |