{
ime_error_e retVal = IME_ERROR_NONE;
- if (portrait_width < 1 || portrait_height < 1 || landscape_width < 1 || landscape_height < 1) {
+ if (!window || portrait_width < 1 || portrait_height < 1 || landscape_width < 1 || landscape_height < 1) {
LOGW("IME_ERROR_INVALID_PARAMETER");
return IME_ERROR_INVALID_PARAMETER;
}
#include <inputmethod.h>
#include "inputmethod_private.h"
+#include "inputmethod_internal.h"
#include <Evas.h>
+#include <Ecore_Wl2.h>
#include "cynara_mock.h"
EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
}
+/**
+ * @testcase utc_ime_set_native_size_null_window
+ * @since_tizen 6.5
+ * @description Negative UTC of the function that updates the input panel window's size information.
+ */
+TEST_F(InputMethodTest, utc_ime_set_native_size_null_window)
+{
+ int ret = ime_set_native_window_size(NULL, 540, 400, 960, 300);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_set_native_window_size_zero_parameter
+ * @since_tizen 6.5
+ * @description Negative UTC of the function that updates the input panel window's size information.
+ */
+TEST_F(InputMethodTest, utc_ime_set_native_window_size_zero_parameter)
+{
+ Ecore_Wl2_Window *win = (Ecore_Wl2_Window *)0x1;
+ int ret = ime_set_native_window_size(win, 0, 0, 0, 0);
+ EXPECT_EQ(ret, IME_ERROR_INVALID_PARAMETER);
+}
+
+/**
+ * @testcase utc_ime_set_native_window_size_not_running
+ * @since_tizen 6.5
+ * @description Negative UTC of the function that updates the input panel window's size information.
+ */
+TEST_F(InputMethodTest, utc_ime_set_native_window_size_not_running)
+{
+ Ecore_Wl2_Window *win = (Ecore_Wl2_Window *)0x1;
+ int ret = ime_set_native_window_size(win, 540, 400, 960, 300);
+ EXPECT_EQ(ret, IME_ERROR_NOT_RUNNING);
+}
+
} // namespace