--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gtest/gtest.h>
+
+#include <inputmethod.h>
+#include <Evas.h>
+
+#include "cynara_mock.h"
+
+namespace {
+
+static Evas_Object *_opt_win = NULL;
+
+static ime_context_h _context = NULL;
+static ime_device_info_h _dev_info = NULL;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+//LCOV_EXCL_START
+void ime_app_main(int argc, char **argv)
+{
+}
+//LCOV_EXCL_STOP
+#ifdef __cplusplus
+}
+#endif
+
+class InputMethodTest : public testing::Test {
+ public:
+ virtual void SetUp() {
+ cynara_check_set_result(CYNARA_API_ACCESS_ALLOWED);
+
+ _context = (ime_context_h)malloc(sizeof(ime_context_h));
+ _dev_info = (ime_device_info_h)malloc(sizeof(ime_device_info_h));
+ }
+ virtual void TearDown() {
+ if (_context) {
+ free(_context);
+ _context = NULL;
+ }
+ if (_dev_info) {
+ free(_dev_info);
+ _dev_info = NULL;
+ }
+ }
+};
+
+class InputMethodDeniedTest : public testing::Test {
+ public:
+ virtual void SetUp() {
+ cynara_check_set_result(CYNARA_API_ACCESS_DENIED);
+
+ _context = (ime_context_h)malloc(sizeof(ime_context_h));
+ _dev_info = (ime_device_info_h)malloc(sizeof(ime_device_info_h));
+ }
+ virtual void TearDown() {
+ cynara_check_set_result(CYNARA_API_ACCESS_ALLOWED);
+
+ if (_context) {
+ free(_context);
+ _context = NULL;
+ }
+ if (_dev_info) {
+ free(_dev_info);
+ _dev_info = NULL;
+ }
+ }
+};
+
+//LCOV_EXCL_START
+static void _focus_in_cb(int context_id, void *user_data)
+{
+}
+
+static void _focus_out_cb(int context_id, void *user_data)
+{
+}
+
+static void _surrounding_text_updated_cb(int context_id, const char *text, int cursor_pos, void *user_data)
+{
+}
+
+static void _input_context_reset_cb(void *user_data)
+{
+}
+
+static void _cursor_position_updated_cb(int cursor_pos, void *user_data)
+{
+}
+
+static void _language_requested_cb(void *user_data, char **lang_code)
+{
+}
+
+static void _language_set_cb(Ecore_IMF_Input_Panel_Lang language, void *user_data)
+{
+}
+
+static void _imdata_set_cb(void *data, unsigned int data_length, void *user_data)
+{
+}
+
+static void _imdata_requested_cb(void *user_data, void **data, unsigned int *data_length)
+{
+}
+
+static void _layout_set_cb(Ecore_IMF_Input_Panel_Layout layout, void *user_data)
+{
+}
+
+static void _return_key_type_set_cb(Ecore_IMF_Input_Panel_Return_Key_Type type, void *user_data)
+{
+}
+
+static void _return_key_state_set_cb(bool disabled, void *user_data)
+{
+}
+
+static void _geometry_requested_cb(void *user_data, int *x, int *y, int *w, int *h)
+{
+}
+
+static bool _process_key_event_cb(ime_key_code_e keycode, ime_key_mask_e keymask, ime_device_info_h dev_info, void *user_data)
+{
+ return true;
+}
+
+static void _display_language_changed_cb(const char *language, void *user_data)
+{
+}
+
+static void _rotation_degree_changed_cb(int degree, void *user_data)
+{
+}
+
+static void _accessibility_state_changed_cb(bool state, void *user_data)
+{
+}
+
+static void _option_window_created_cb(Evas_Object *window, ime_option_window_type_e type, void *user_data)
+{
+ _opt_win = window;
+}
+
+static void _option_window_destroyed_cb(Evas_Object *window, void *user_data)
+{
+ _opt_win = NULL;
+}
+
+static void _prediction_hint_set_cb(const char *prediction_hint, void *user_data)
+{
+}
+
+static void _mime_type_set_request_cb(const char *mime_type, void *user_data)
+{
+}
+
+static bool _process_key_event_with_keycode_cb(unsigned int key_code, ime_key_code_e key_sym, ime_key_mask_e key_mask, ime_device_info_h dev_info, void *user_data)
+{
+ return true;
+}
+//LCOV_EXCL_STOP
+
+/**
+ * @testcase utc_ime_event_set_focus_in_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c focus_in event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_focus_in_cb_p)
+{
+ int ret = ime_event_set_focus_in_cb(_focus_in_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_focus_out_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c focus_out event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_focus_out_cb_p)
+{
+ int ret = ime_event_set_focus_out_cb(_focus_out_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_surrounding_text_updated_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c surrounding_text_updated event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_surrounding_text_updated_cb_p)
+{
+ int ret = ime_event_set_surrounding_text_updated_cb(_surrounding_text_updated_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_input_context_reset_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets #c input_context_reset event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_input_context_reset_cb_p)
+{
+ int ret = ime_event_set_input_context_reset_cb(_input_context_reset_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_cursor_position_updated_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c cursor_position_updated event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_cursor_position_updated_cb_p)
+{
+ int ret = ime_event_set_cursor_position_updated_cb(_cursor_position_updated_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_language_requested_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c language_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_language_requested_cb_p)
+{
+ int ret = ime_event_set_language_requested_cb(_language_requested_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_language_set_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c language_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_language_set_cb_p)
+{
+ int ret = ime_event_set_language_set_cb(_language_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_imdata_set_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c imdata_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_imdata_set_cb_p)
+{
+ int ret = ime_event_set_imdata_set_cb(_imdata_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_imdata_requested_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c imdata_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_imdata_requested_cb_p)
+{
+ int ret = ime_event_set_imdata_requested_cb(_imdata_requested_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_layout_set_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c layout_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_layout_set_cb_p)
+{
+ int ret = ime_event_set_layout_set_cb(_layout_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_return_key_type_set_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c return_key_type_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_return_key_type_set_cb_p)
+{
+ int ret = ime_event_set_return_key_type_set_cb(_return_key_type_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_return_key_state_set_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c return_key_state_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_return_key_state_set_cb_p)
+{
+ int ret = ime_event_set_return_key_state_set_cb(_return_key_state_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_geometry_requested_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c geometry_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_geometry_requested_cb_p)
+{
+ int ret = ime_event_set_geometry_requested_cb(_geometry_requested_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_process_key_event_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c process_key_event event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_process_key_event_cb_p)
+{
+ int ret = ime_event_set_process_key_event_cb(_process_key_event_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_display_language_changed_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c display_language_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_display_language_changed_cb_p)
+{
+ int ret = ime_event_set_display_language_changed_cb(_display_language_changed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_rotation_degree_changed_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets #c rotation_degree_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_rotation_degree_changed_cb_p)
+{
+ int ret = ime_event_set_rotation_degree_changed_cb(_rotation_degree_changed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_accessibility_state_changed_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c accessibility_state_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_accessibility_state_changed_cb_p)
+{
+ int ret = ime_event_set_accessibility_state_changed_cb(_accessibility_state_changed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_option_window_created_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c option_window_created event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_option_window_created_cb_p)
+{
+ int ret = ime_event_set_option_window_created_cb(_option_window_created_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_option_window_destroyed_cb_p
+ * @since_tizen 2.4
+ * @description Positive UTC of the function that sets @c option_window_destroyed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_p)
+{
+ int ret = ime_event_set_option_window_destroyed_cb(_option_window_destroyed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_prediction_hint_set_cb_p
+ * @since_tizen 4.0
+ * @description Positive UTC of the function that sets @c prediction_hint event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_prediction_hint_set_cb_p)
+{
+ int ret = ime_event_set_prediction_hint_set_cb(_prediction_hint_set_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_mime_type_set_request_cb_p
+ * @since_tizen 4.0
+ * @description Positive UTC of the function that sets @c mime_type event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_mime_type_set_request_cb_p)
+{
+ int ret = ime_event_set_mime_type_set_request_cb(_mime_type_set_request_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+/**
+ * @testcase utc_ime_event_set_process_key_event_with_keycode_cb_p
+ * @since_tizen 5.5
+ * @description Positive UTC of the function that sets @c process_key_event_with_keycode event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_process_key_event_with_keycode_cb_p)
+{
+ int ret = ime_event_set_process_key_event_with_keycode_cb(_process_key_event_with_keycode_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+}
+
+//& purpose: A purpose of a first negative TC.
+/**
+ * @testcase utc_ime_run_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that runs the main loop of IME application.
+ */
+TEST_F(InputMethodTest, utc_ime_run_n)
+{
+ int ret = ime_run(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_run_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that runs the main loop of IME application.
+ */
+TEST_F(InputMethodTest, utc_ime_run_n2)
+{
+ ime_callback_s ime_cb = {NULL, NULL, NULL, NULL};
+ int ret = ime_run(&ime_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NO_CALLBACK_FUNCTION);
+}
+
+/**
+ * @testcase utc_ime_event_set_focus_in_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c focus_in event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_focus_in_cb_n)
+{
+ int ret = ime_event_set_focus_in_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_focus_out_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c focus_out event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_focus_out_cb_n)
+{
+ int ret = ime_event_set_focus_out_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_surrounding_text_updated_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests the surrounding text from the position of the cursor, asynchronously.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_surrounding_text_updated_cb_n)
+{
+ int ret = ime_event_set_surrounding_text_updated_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_input_context_reset_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets #c input_context_reset event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_input_context_reset_cb_n)
+{
+ int ret = ime_event_set_input_context_reset_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_cursor_position_updated_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c cursor_position_updated event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_cursor_position_updated_cb_n)
+{
+ int ret = ime_event_set_cursor_position_updated_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_language_requested_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c language_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_language_requested_cb_n)
+{
+ int ret = ime_event_set_language_requested_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_language_set_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c language_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_language_set_cb_n)
+{
+ int ret = ime_event_set_language_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_imdata_set_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c imdata_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_imdata_set_cb_n)
+{
+ int ret = ime_event_set_imdata_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_imdata_requested_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c imdata_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_imdata_requested_cb_n)
+{
+ int ret = ime_event_set_imdata_requested_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_layout_set_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c layout_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_layout_set_cb_n)
+{
+ int ret = ime_event_set_layout_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_return_key_type_set_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c return_key_type_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_return_key_type_set_cb_n)
+{
+ int ret = ime_event_set_return_key_type_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_return_key_state_set_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c return_key_state_set event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_return_key_state_set_cb_n)
+{
+ int ret = ime_event_set_return_key_state_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_geometry_requested_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c geometry_requested event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_geometry_requested_cb_n)
+{
+ int ret = ime_event_set_geometry_requested_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_process_key_event_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c process_key_event event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_process_key_event_cb_n)
+{
+ int ret = ime_event_set_process_key_event_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_display_language_changed_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c display_language_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_display_language_changed_cb_n)
+{
+ int ret = ime_event_set_display_language_changed_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_rotation_degree_changed_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets #c rotation_degree_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_rotation_degree_changed_cb_n)
+{
+ int ret = ime_event_set_rotation_degree_changed_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_accessibility_state_changed_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sets @c accessibility_state_changed event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_accessibility_state_changed_cb_n)
+{
+ int ret = ime_event_set_accessibility_state_changed_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_option_window_created_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to create an option window from the input panel.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_option_window_created_cb_n)
+{
+ int ret = ime_event_set_option_window_created_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_event_set_option_window_destroyed_cb_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to destroy an option window.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_option_window_destroyed_cb_n)
+{
+ int ret = ime_event_set_option_window_destroyed_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_send_key_event_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sends a key event to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_send_key_event_n)
+{
+ int ret = ime_send_key_event(IME_KEY_BackSpace, IME_KEY_MASK_PRESSED, true);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_commit_string_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sends the text to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_commit_string_n)
+{
+ int ret = ime_commit_string(NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_commit_string_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that sends the text to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_commit_string_n2)
+{
+ int ret = ime_commit_string("test");
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_show_preedit_string_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to show preedit string.
+ */
+TEST_F(InputMethodTest, utc_ime_show_preedit_string_n)
+{
+ int ret = ime_show_preedit_string();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_hide_preedit_string_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to hide preedit string.
+ */
+TEST_F(InputMethodTest, utc_ime_hide_preedit_string_n)
+{
+ int ret = ime_hide_preedit_string();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_update_preedit_string_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that updates a new preedit string.
+ */
+TEST_F(InputMethodTest, utc_ime_update_preedit_string_n)
+{
+ int ret = ime_update_preedit_string(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_update_preedit_string_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that updates a new preedit string.
+ */
+TEST_F(InputMethodTest, utc_ime_update_preedit_string_n2)
+{
+ int ret = ime_update_preedit_string("test", NULL);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_request_surrounding_text_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests the surrounding text from the position of the cursor, asynchronously.
+ */
+TEST_F(InputMethodTest, utc_ime_request_surrounding_text_n)
+{
+ int ret = ime_request_surrounding_text(-1, -1);
+ EXPECT_EQ(ret, IME_ERROR_NO_CALLBACK_FUNCTION);
+}
+
+/**
+ * @testcase utc_ime_request_surrounding_text_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests the surrounding text from the position of the cursor, asynchronously.
+ */
+TEST_F(InputMethodTest, utc_ime_request_surrounding_text_n2)
+{
+ int ret = ime_event_set_surrounding_text_updated_cb(_surrounding_text_updated_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+ ret = ime_request_surrounding_text(-1, -1);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_delete_surrounding_text_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to delete surrounding text.
+ */
+TEST_F(InputMethodTest, utc_ime_delete_surrounding_text_n)
+{
+ int ret = ime_delete_surrounding_text(0, 0);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_delete_surrounding_text_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to delete surrounding text.
+ */
+TEST_F(InputMethodTest, utc_ime_delete_surrounding_text_n2)
+{
+ int ret = ime_delete_surrounding_text(0, 1);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_get_surrounding_text_n
+ * @since_tizen 3.0
+ * @description Negative UTC of the function that requests to get surrounding text.
+ */
+TEST_F(InputMethodTest, utc_ime_get_surrounding_text_n)
+{
+ int ret = ime_get_surrounding_text(-1, -1, NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_set_selection_n
+ * @since_tizen 3.0
+ * @description Negative UTC of the function that requests to set selection text.
+ */
+TEST_F(InputMethodTest, utc_ime_set_selection_n)
+{
+ int ret = ime_set_selection(-1, -1);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_get_main_window_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that returns the pointer of input panel main window.
+ */
+TEST_F(InputMethodTest, utc_ime_get_main_window_n)
+{
+ Evas_Object *win = ime_get_main_window();
+ int ret = get_last_result();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+ EXPECT_EQ(win, NULL);
+}
+
+/**
+ * @testcase utc_ime_get_main_window_denied
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that returns the pointer of input panel main window.
+ */
+TEST_F(InputMethodDeniedTest, utc_ime_get_main_window_denied)
+{
+ Evas_Object *win = ime_get_main_window();
+ int ret = get_last_result();
+ EXPECT_EQ(ret, IME_ERROR_PERMISSION_DENIED);
+ EXPECT_EQ(win, NULL);
+}
+
+/**
+ * @testcase utc_ime_set_size_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that updates the input panel window's size information.
+ */
+TEST_F(InputMethodTest, utc_ime_set_size_n)
+{
+ int ret = ime_set_size(0, 0, 0, 0);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_set_size_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that updates the input panel window's size information.
+ */
+TEST_F(InputMethodTest, utc_ime_set_size_n2)
+{
+ int ret = ime_set_size(540, 400, 960, 300);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_create_option_window_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to create an option window from the input panel.
+ */
+TEST_F(InputMethodTest, utc_ime_create_option_window_n)
+{
+ int ret = ime_create_option_window();
+ EXPECT_EQ(ret, IME_ERROR_NO_CALLBACK_FUNCTION);
+}
+
+/**
+ * @testcase utc_ime_create_option_window_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to create an option window from the input panel.
+ */
+TEST_F(InputMethodTest, utc_ime_create_option_window_n2)
+{
+ int ret = ime_event_set_option_window_created_cb(_option_window_created_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+ ret = ime_event_set_option_window_destroyed_cb(_option_window_destroyed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+ ret = ime_create_option_window();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_destroy_option_window_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to destroy an option window.
+ */
+TEST_F(InputMethodTest, utc_ime_destroy_option_window_n)
+{
+ int ret = ime_destroy_option_window(NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_destroy_option_window_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that requests to destroy an option window.
+ */
+TEST_F(InputMethodTest, utc_ime_destroy_option_window_n2)
+{
+ int ret = ime_event_set_option_window_created_cb(_option_window_created_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+ ret = ime_event_set_option_window_destroyed_cb(_option_window_destroyed_cb, NULL);
+ EXPECT_EQ(ret, IME_ERROR_NONE);
+ ret = ime_destroy_option_window(NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_layout_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the layout information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_layout_n)
+{
+ int ret = ime_context_get_layout(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_layout_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the layout information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_layout_n2)
+{
+ Ecore_IMF_Input_Panel_Layout layout;
+ int ret = ime_context_get_layout(_context, &layout);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_layout_variation_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the layout variation information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_layout_variation_n)
+{
+ int ret = ime_context_get_layout_variation(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_layout_variation_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the layout variation information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_layout_variation_n2)
+{
+ ime_layout_variation_e variation;
+ int ret = ime_context_get_layout_variation(_context, &variation);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_cursor_position_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the cursor position information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_cursor_position_n)
+{
+ int ret = ime_context_get_cursor_position(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_cursor_position_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the cursor position information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_cursor_position_n2)
+{
+ int pos;
+ int ret = ime_context_get_cursor_position(_context, &pos);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_autocapital_type_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the autocapital type information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_autocapital_type_n)
+{
+ int ret = ime_context_get_autocapital_type(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_autocapital_type_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the autocapital type information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_autocapital_type_n2)
+{
+ Ecore_IMF_Autocapital_Type type;
+ int ret = ime_context_get_autocapital_type(_context, &type);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_return_key_type_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the @c Return key label type information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_return_key_type_n)
+{
+ int ret = ime_context_get_return_key_type(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_return_key_type_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the @c Return key label type information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_return_key_type_n2)
+{
+ Ecore_IMF_Input_Panel_Return_Key_Type type;
+ int ret = ime_context_get_return_key_type(_context, &type);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_return_key_state_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the @c Return key state information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_return_key_state_n)
+{
+ int ret = ime_context_get_return_key_state(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_return_key_state_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the @c Return key state information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_return_key_state_n2)
+{
+ bool state;
+ int ret = ime_context_get_return_key_state(_context, &state);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_prediction_mode_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the prediction mode information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_prediction_mode_n)
+{
+ int ret = ime_context_get_prediction_mode(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_prediction_mode_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the prediction mode information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_prediction_mode_n2)
+{
+ bool mode;
+ int ret = ime_context_get_prediction_mode(_context, &mode);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_password_mode_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the password mode information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_password_mode_n)
+{
+ int ret = ime_context_get_password_mode(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_password_mode_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the password mode information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_password_mode_n2)
+{
+ bool mode;
+ int ret = ime_context_get_password_mode(_context, &mode);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_input_hint_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the input hint information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_input_hint_n)
+{
+ int ret = ime_context_get_input_hint(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_input_hint_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the input hint information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_input_hint_n2)
+{
+ Ecore_IMF_Input_Hints hint;
+ int ret = ime_context_get_input_hint(_context, &hint);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_bidi_direction_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the text bidirectional information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_bidi_direction_n)
+{
+ int ret = ime_context_get_bidi_direction(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_bidi_direction_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the text bidirectional information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_bidi_direction_n2)
+{
+ Ecore_IMF_BiDi_Direction dir;
+ int ret = ime_context_get_bidi_direction(_context, &dir);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_context_get_language_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the preferred language information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_language_n)
+{
+ int ret = ime_context_get_language(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_context_get_language_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the preferred language information from the given input context.
+ */
+TEST_F(InputMethodTest, utc_ime_context_get_language_n2)
+{
+ Ecore_IMF_Input_Panel_Lang lang;
+ int ret = ime_context_get_language(_context, &lang);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_name_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device name of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_name_n)
+{
+ int ret = ime_device_info_get_name(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_name_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device name of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_name_n2)
+{
+ char *dev_name = NULL;
+ int ret = ime_device_info_get_name(_dev_info, &dev_name);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+
+ if (dev_name)
+ free(dev_name);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_class_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device class of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_class_n)
+{
+ int ret = ime_device_info_get_class(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_class_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device class of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_class_n2)
+{
+ Ecore_IMF_Device_Class dev_class;
+ int ret = ime_device_info_get_class(_dev_info, &dev_class);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_subclass_n
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device subclass of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_subclass_n)
+{
+ int ret = ime_device_info_get_subclass(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_device_info_get_subclass_n2
+ * @since_tizen 2.4
+ * @description Negative UTC of the function that gets the device subclass of the key event.
+ */
+TEST_F(InputMethodTest, utc_ime_device_info_get_subclass_n2)
+{
+ Ecore_IMF_Device_Subclass dev_subclass;
+ int ret = ime_device_info_get_subclass(_dev_info, &dev_subclass);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_event_set_prediction_hint_set_cb_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sets @c prediction_hint event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_prediction_hint_set_cb_n)
+{
+ int ret = ime_event_set_prediction_hint_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_send_private_command_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sends the private_command to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_send_private_command_n)
+{
+ int ret = ime_send_private_command(NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_send_private_command_n2
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sends the private_command to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_send_private_command_n2)
+{
+ int ret = ime_send_private_command("test");
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_event_set_mime_type_set_request_cb_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sets @c mime_type event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_mime_type_set_request_cb_n)
+{
+ int ret = ime_event_set_mime_type_set_request_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_commit_content_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sends the content to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_commit_content_n)
+{
+ int ret = ime_commit_content(NULL, NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_commit_content_n2
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sends the content to the associated text input UI control.
+ */
+TEST_F(InputMethodTest, utc_ime_commit_content_n2)
+{
+ int ret = ime_commit_content("test1", "test2", "test3");
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_set_floating_mode_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that sets the floating mode of input panel window.
+ */
+TEST_F(InputMethodTest, utc_ime_set_floating_mode_n)
+{
+ int ret = ime_set_floating_mode(true);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_set_floating_drag_start_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that allows the movement of the floating input panel window.
+ */
+TEST_F(InputMethodTest, utc_ime_set_floating_drag_start_n)
+{
+ int ret = ime_set_floating_drag_start();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_set_floating_drag_end_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that disallows the movement of the floating input panel window.
+ */
+TEST_F(InputMethodTest, utc_ime_set_floating_drag_end_n)
+{
+ int ret = ime_set_floating_drag_end();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_get_selected_text_n
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that gets the selected text synchronously.
+ */
+TEST_F(InputMethodTest, utc_ime_get_selected_text_n)
+{
+ char *text = NULL;
+ int ret = ime_get_selected_text(&text);
+ if (text)
+ free(text);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_get_selected_text_n2
+ * @since_tizen 4.0
+ * @description Negative UTC of the function that gets the selected text synchronously.
+ */
+TEST_F(InputMethodTest, utc_ime_get_selected_text_n2)
+{
+ int ret = ime_get_selected_text(NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_request_hide_n
+ * @since_tizen 5.0
+ * @description Negative UTC of the function that sends the request to hide IME.
+ */
+TEST_F(InputMethodTest, utc_ime_request_hide_n)
+{
+ int ret = ime_request_hide();
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_event_set_prediction_hint_data_set_cb_n
+ * @since_tizen 5.0
+ * @description Negative UTC of the function that sets @c prediction_hint_data event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_prediction_hint_data_set_cb_n)
+{
+ int ret = ime_event_set_prediction_hint_data_set_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_update_input_panel_event_n
+ * @since_tizen 5.5
+ * @description Negative UTC of the function that updates the state of input panel event.
+ */
+TEST_F(InputMethodTest, utc_ime_update_input_panel_event_n)
+{
+ int ret = ime_update_input_panel_event(IME_EVENT_TYPE_SHIFT_MODE, 0);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_event_set_process_key_event_with_keycode_cb_n
+ * @since_tizen 5.5
+ * @description Negative UTC of the function that sets @c process_key_event_with_keycode event callback function.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_process_key_event_with_keycode_cb_n)
+{
+ int ret = ime_event_set_process_key_event_with_keycode_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_set_candidate_visibility_state_n
+ * @since_tizen 5.5
+ * @description Negative UTC of the function that sets the candidate visibility state.
+ */
+TEST_F(InputMethodTest, utc_ime_set_candidate_visibility_state_n)
+{
+ int ret = ime_set_candidate_visibility_state(true);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
+/**
+ * @testcase utc_ime_event_set_process_input_device_event_cb_n
+ * @since_tizen 3.0
+ * @description Negative UTC of the function that called when the input event is received from an unconventional input device that does not generate key events.
+ */
+TEST_F(InputMethodTest, utc_ime_event_set_process_input_device_event_cb_n)
+{
+ int ret = ime_event_set_process_input_device_event_cb(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_input_device_rotary_get_direction_n
+ * @since_tizen 3.0
+ * @description Negative UTC of the function for Rotary input device event.
+ */
+TEST_F(InputMethodTest, utc_ime_input_device_rotary_get_direction_n)
+{
+ int ret = ime_input_device_rotary_get_direction(NULL, NULL);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+} // namespace