[UTC][capi-ui-inputmethod][ACR-1306][Added utc test-cases for updating geometry of...
authorInhong Han <inhong1.han@samsung.com>
Fri, 23 Nov 2018 07:57:19 +0000 (16:57 +0900)
committerInhong Han <inhong1.han@samsung.com>
Fri, 23 Nov 2018 07:57:19 +0000 (16:57 +0900)
Change-Id: I9ae7a1056f4008e1e8b94c4319c1dca9cf784cce

src/utc/capi-ui-inputmethod/public.list
src/utc/capi-ui-inputmethod/tct-capi-ui-inputmethod-core_mobile.h
src/utc/capi-ui-inputmethod/tct-capi-ui-inputmethod-core_tizeniot.h
src/utc/capi-ui-inputmethod/tct-capi-ui-inputmethod-core_wearable.h
src/utc/capi-ui-inputmethod/utc-capi-ui-inputmethod.c

index cfefd69b7b3b0e897b3b1108cc83bf93ccc2d5f8..f5847e7acd10c8b59400b6ae64915106ef35fc64 100755 (executable)
@@ -56,4 +56,5 @@ ime_set_floating_drag_start
 ime_set_floating_drag_end
 ime_get_selected_text
 ime_request_hide
-ime_update_input_panel_event
\ No newline at end of file
+ime_update_input_panel_event
+ime_update_custom_geometry
\ No newline at end of file
index 354f946613c4aa54512e1a38e7678b0cd640e025..af34a85717c6ea1a3bae70d2cb289cb5c45b1c9c 100755 (executable)
@@ -65,6 +65,7 @@ extern int utc_ime_set_floating_drag_end_p(void);
 extern int utc_ime_get_selected_text_p(void);
 extern int utc_ime_request_hide_p(void);
 extern int utc_ime_update_input_panel_event_p(void);
+extern int utc_ime_update_custom_geometry_p(void);
 extern int utc_ime_run_n(void);
 extern int utc_ime_run_n2(void);
 extern int utc_ime_event_set_focus_in_cb_n(void);
@@ -148,6 +149,7 @@ extern int utc_ime_get_selected_text_n(void);
 extern int utc_ime_get_selected_text_n2(void);
 extern int utc_ime_request_hide_n(void);
 extern int utc_ime_update_input_panel_event_n(void);
+extern int utc_ime_update_custom_geometry_n(void);
 
 testcase tc_array[] = {
        {"utc_ime_run_p",utc_ime_run_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -193,6 +195,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_p",utc_ime_get_selected_text_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_p",utc_ime_request_hide_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_p",utc_ime_update_input_panel_event_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_p",utc_ime_update_custom_geometry_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n",utc_ime_run_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n2",utc_ime_run_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_event_set_focus_in_cb_n",utc_ime_event_set_focus_in_cb_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -276,6 +279,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_n2",utc_ime_get_selected_text_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_n",utc_ime_request_hide_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_n",utc_ime_update_input_panel_event_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_n",utc_ime_update_custom_geometry_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };
 
index 354f946613c4aa54512e1a38e7678b0cd640e025..af34a85717c6ea1a3bae70d2cb289cb5c45b1c9c 100755 (executable)
@@ -65,6 +65,7 @@ extern int utc_ime_set_floating_drag_end_p(void);
 extern int utc_ime_get_selected_text_p(void);
 extern int utc_ime_request_hide_p(void);
 extern int utc_ime_update_input_panel_event_p(void);
+extern int utc_ime_update_custom_geometry_p(void);
 extern int utc_ime_run_n(void);
 extern int utc_ime_run_n2(void);
 extern int utc_ime_event_set_focus_in_cb_n(void);
@@ -148,6 +149,7 @@ extern int utc_ime_get_selected_text_n(void);
 extern int utc_ime_get_selected_text_n2(void);
 extern int utc_ime_request_hide_n(void);
 extern int utc_ime_update_input_panel_event_n(void);
+extern int utc_ime_update_custom_geometry_n(void);
 
 testcase tc_array[] = {
        {"utc_ime_run_p",utc_ime_run_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -193,6 +195,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_p",utc_ime_get_selected_text_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_p",utc_ime_request_hide_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_p",utc_ime_update_input_panel_event_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_p",utc_ime_update_custom_geometry_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n",utc_ime_run_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n2",utc_ime_run_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_event_set_focus_in_cb_n",utc_ime_event_set_focus_in_cb_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -276,6 +279,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_n2",utc_ime_get_selected_text_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_n",utc_ime_request_hide_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_n",utc_ime_update_input_panel_event_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_n",utc_ime_update_custom_geometry_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };
 
index a045e56f4d248e8616538f62cc68075421ba56d3..d4ff88aa4f67ebf14a61d88d41f9f9d1a97d5666 100755 (executable)
@@ -65,6 +65,7 @@ extern int utc_ime_set_floating_drag_end_p(void);
 extern int utc_ime_get_selected_text_p(void);
 extern int utc_ime_request_hide_p(void);
 extern int utc_ime_update_input_panel_event_p(void);
+extern int utc_ime_update_custom_geometry_p(void);
 extern int utc_ime_run_n(void);
 extern int utc_ime_run_n2(void);
 extern int utc_ime_event_set_focus_in_cb_n(void);
@@ -150,6 +151,7 @@ extern int utc_ime_get_selected_text_n(void);
 extern int utc_ime_get_selected_text_n2(void);
 extern int utc_ime_request_hide_n(void);
 extern int utc_ime_update_input_panel_event_n(void);
+extern int utc_ime_update_custom_geometry_n(void);
 
 testcase tc_array[] = {
        {"utc_ime_run_p",utc_ime_run_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -195,6 +197,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_p",utc_ime_get_selected_text_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_p",utc_ime_request_hide_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_p",utc_ime_update_input_panel_event_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_p",utc_ime_update_custom_geometry_p,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n",utc_ime_run_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_run_n2",utc_ime_run_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_event_set_focus_in_cb_n",utc_ime_event_set_focus_in_cb_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
@@ -280,6 +283,7 @@ testcase tc_array[] = {
        {"utc_ime_get_selected_text_n2",utc_ime_get_selected_text_n2,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_request_hide_n",utc_ime_request_hide_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {"utc_ime_update_input_panel_event_n",utc_ime_update_input_panel_event_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
+       {"utc_ime_update_custom_geometry_n",utc_ime_update_custom_geometry_n,utc_capi_ui_inputmethod_startup,utc_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };
 
index 1486ed2928afe0a1cff0d1797e5e4b1aafc8a440..63a9b6567be2921122da48b3f2b4ec422d6fc065 100755 (executable)
@@ -215,6 +215,11 @@ static void _ime_update_input_panel_event()
     g_ret = ime_update_input_panel_event(IME_EVENT_TYPE_LANGUAGE, 0);
     elm_exit();
 }
+static void _ime_update_custom_geometry()
+{
+    g_ret = ime_update_custom_geometry(0, 0, 720, 442);
+    elm_exit();
+}
 
 static void _create_cb(void *user_data)
 {
@@ -826,6 +831,19 @@ int utc_ime_update_input_panel_event_p(void)
     return 0;
 }
 
+/**
+ * @testcase        utc_ime_update_custom_geometry_p
+ * @since_tizen     5.5
+ * @description     Positive UTC of the function that updates geometry of input panel
+ */
+int utc_ime_update_custom_geometry_p(void)
+{
+    int ret = ime_run(&basic_callback, (void *)_ime_update_custom_geometry);
+    assert_eq(ret, IME_ERROR_NONE);
+    assert_eq(g_ret, IME_ERROR_NONE);
+    return 0;
+}
+
 //& purpose: A purpose of a first negative TC.
 /**
  * @testcase           utc_ime_run_n
@@ -1857,6 +1875,18 @@ int utc_ime_update_input_panel_event_n(void)
     return 0;
 }
 
+/**
+ * @testcase        utc_ime_update_custom_geometry_n
+ * @since_tizen     5.5
+ * @description     Negative UTC of the function that updates geometry of input panel
+ */
+int utc_ime_update_custom_geometry_n(void)
+{
+    int ret = ime_update_custom_geometry(-1, 0, 0, 0);
+    assert_eq(ret, IME_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
 #ifdef WEARABLE
 /**
  * @testcase           utc_ime_event_set_process_input_device_event_cb_n