summaryrefslogtreecommitdiff
path: root/TC
diff options
context:
space:
mode:
Diffstat (limited to 'TC')
-rwxr-xr-xTC/_export_env.sh3
-rwxr-xr-xTC/config5
-rwxr-xr-xTC/testcase/Makefile15
-rwxr-xr-xTC/testcase/tslist6
-rw-r--r--TC/testcase/utc_utilx_key_grab_test.c251
-rw-r--r--TC/testcase/utc_utilx_notification_level_test.c214
-rw-r--r--TC/testcase/utc_utilx_opaque_test.c153
-rw-r--r--TC/testcase/utc_utilx_screen_shot_test.c162
-rw-r--r--TC/testcase/utc_utilx_test.c79
9 files changed, 798 insertions, 90 deletions
diff --git a/TC/_export_env.sh b/TC/_export_env.sh
index 72a11ec..467c30b 100755
--- a/TC/_export_env.sh
+++ b/TC/_export_env.sh
@@ -1,6 +1,7 @@
#!/bin/sh
-. ./config
+source ./config
+
export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path
export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path
export PATH=$TET_TARGET_PATH/bin:$PATH
diff --git a/TC/config b/TC/config
index c7eae66..dc96c8d 100755
--- a/TC/config
+++ b/TC/config
@@ -1,2 +1,3 @@
-TET_INSTALL_HOST_PATH=/home/nfs_mount/TETware
-TET_INSTALL_TARGET_PATH=/mnt/nfs/TETware
+PKG_NAME=utilX
+TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/TETware
+TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware
diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile
index dbbc399..0982f06 100755
--- a/TC/testcase/Makefile
+++ b/TC/testcase/Makefile
@@ -1,20 +1,21 @@
-CC = gcc
+include ../config
-C_FILES = $(shell ls *.c)
+CC ?= gcc
-PKGS = elementary ecore-x ecore evas x11 dlog glib-2.0 utilX
+C_FILES = $(shell ls *.c)
+PKGS = $(PKG_NAME)
+PKGS += glib-2.0
+PKGS += ecore-x ecore-evas x11 ecore
+LDFLAGS = `pkg-config --libs $(PKGS)`
LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
-LDFLAGS += `pkg-config --libs $(PKGS)`
-CFLAGS += `pkg-config --cflags $(PKGS)`
-CFLAGS += -I.
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
CFLAGS += -I$(TET_ROOT)/inc/tet3
CFLAGS += -Wall
-#TARGETS = $(C_FILES:%.c=tc-%)
TCS := $(shell ls -1 *.c | cut -d. -f1)
all: $(TCS)
diff --git a/TC/testcase/tslist b/TC/testcase/tslist
index 81af698..4caa7d1 100755
--- a/TC/testcase/tslist
+++ b/TC/testcase/tslist
@@ -1 +1,5 @@
-/testcase/utc_utilx_test
+/testcase/utc_utilx_key_grab_test
+/testcase/utc_utilx_notification_level_test
+/testcase/utc_utilx_screen_shot_test
+/testcase/utc_utilx_opaque_test
+
diff --git a/TC/testcase/utc_utilx_key_grab_test.c b/TC/testcase/utc_utilx_key_grab_test.c
new file mode 100644
index 0000000..7f7bbb4
--- /dev/null
+++ b/TC/testcase/utc_utilx_key_grab_test.c
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 <tet_api.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <Ecore_Evas.h>
+#include <sys/types.h>
+#include <X11/X.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_utilx_grab_key_excl_p(void);
+static void utc_utilx_grab_key_top_p(void);
+static void utc_utilx_grab_key_share_p(void);
+static void utc_utilx_grab_key_excl_n(void);
+static void utc_utilx_grab_key_top_n(void);
+static void utc_utilx_grab_key_share_n(void);
+static void utc_utilx_ungrab_key_p(void);
+static void utc_utilx_ungrab_key_n(void);
+
+struct tet_testlist tet_testlist[] = {
+ { utc_utilx_grab_key_excl_p, 1 },
+ { utc_utilx_grab_key_top_p, 1 },
+ { utc_utilx_grab_key_share_p, 1 },
+ { utc_utilx_grab_key_excl_n, 1 },
+ { utc_utilx_grab_key_top_n, 1 },
+ { utc_utilx_grab_key_share_n, 1 },
+ { utc_utilx_ungrab_key_p, 1 },
+ { utc_utilx_ungrab_key_n, 1 },
+ // Do not remove below line
+ { NULL, 0 }
+};
+
+Ecore_Evas *ee;
+Ecore_X_Display *disp;
+Ecore_X_Window win;
+
+static void startup(void)
+{
+ /* start of TC */
+ if(!ecore_init()){
+ dts_fail("utilx_grab_key", "failed ecore_init");
+ }
+ if(!ecore_evas_init()){
+ dts_fail("utilx_grab_key", "failed ecore_evas_init");
+ }
+
+ ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 720, 1280);
+ if(!ee){
+ dts_fail("utilx_grab_key", "failed to make window");
+ }
+ ecore_evas_title_set(ee, "Ecore_Evas Template");
+ ecore_evas_borderless_set(ee, 0);
+ ecore_evas_show(ee);
+
+ disp = ecore_x_display_get();
+ if(!disp){
+ dts_fail("utilx_grab_key", "failed to get display");
+ }
+
+ win = ecore_evas_software_x11_window_get(ee);
+ if(!win){
+ dts_fail("utilx_grab_key", "failed to get ecore_x_window");
+ }
+}
+
+static void cleanup(void)
+{
+ /* end of TC */
+ ecore_evas_shutdown();
+ ecore_shutdown();
+}
+
+
+/**
+ * @brief test case of utilx_grab_key() / utilx_ungrab_key()
+ */
+
+static void utc_utilx_grab_key_excl_p(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(disp, win, KEY_MEDIA, EXCLUSIVE_GRAB);
+ if( grab_result == 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_MEDIA);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ }
+}
+
+static void utc_utilx_grab_key_top_p(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(disp, win, KEY_STOPCD, TOP_POSITION_GRAB);
+ if( grab_result == 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ }
+}
+
+static void utc_utilx_grab_key_share_p(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(disp, win, KEY_STOPCD, SHARED_GRAB);
+ if( grab_result == 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ }
+}
+
+static void utc_utilx_grab_key_excl_n(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(NULL, win, KEY_STOPCD, EXCLUSIVE_GRAB);
+ if( grab_result != 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+
+ }
+}
+
+static void utc_utilx_grab_key_top_n(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(NULL, win, KEY_STOPCD, TOP_POSITION_GRAB);
+ if( grab_result != 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+
+ }
+}
+
+static void utc_utilx_grab_key_share_n(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(NULL, win, KEY_STOPCD, SHARED_GRAB);
+ if( grab_result != 0 )
+ {
+ dts_pass("utilx_grab_key", "passed");
+ }
+ else
+ {
+ dts_fail("utilx_grab_key", "failed");
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if( ungrab_result != 0)
+ dts_fail("utilx_grab_key", "ungrab failed");
+
+ }
+}
+
+static void utc_utilx_ungrab_key_p(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ grab_result = utilx_grab_key(disp, win, KEY_STOPCD, SHARED_GRAB);
+ if( grab_result != 0 ){
+ dts_fail("utilx_ungrab_key", "failed to grab the key");
+ }
+
+ ungrab_result = utilx_ungrab_key(disp, win, KEY_STOPCD);
+ if(ungrab_result == 0)
+ {
+ dts_pass("utilx_ungrab_key", "passed");
+ }
+ else
+ {
+ dts_fail("utilx_ungrab_key", "failed");
+ }
+}
+
+static void utc_utilx_ungrab_key_n(void)
+{
+ int grab_result;
+ int ungrab_result;
+
+ ungrab_result = utilx_ungrab_key(NULL, win, KEY_STOPCD);
+ if(ungrab_result != 0)
+ {
+ dts_pass("utilx_ungrab_key", "passed");
+ }
+ else
+ {
+ dts_fail("utilx_ungrab_key", "failed");
+ }
+}
diff --git a/TC/testcase/utc_utilx_notification_level_test.c b/TC/testcase/utc_utilx_notification_level_test.c
new file mode 100644
index 0000000..cd97990
--- /dev/null
+++ b/TC/testcase/utc_utilx_notification_level_test.c
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 <tet_api.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <Ecore_Evas.h>
+#include <sys/types.h>
+#include <X11/X.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_utilx_system_notification_level_test_positive_1(void);
+static void utc_utilx_system_notification_level_test_positive_2(void);
+static void utc_utilx_system_notification_level_test_positive_3(void);
+static void utc_utilx_system_notification_level_test_positive_4(void);
+static void utc_utilx_system_notification_level_test_negative_1(void);
+static void utc_utilx_system_notification_level_test_negative_2(void);
+
+
+struct tet_testlist tet_testlist[] = {
+ { utc_utilx_system_notification_level_test_positive_1, 1 },
+ { utc_utilx_system_notification_level_test_positive_2, 1 },
+ { utc_utilx_system_notification_level_test_positive_3, 1 },
+ { utc_utilx_system_notification_level_test_positive_4, 1 },
+ { utc_utilx_system_notification_level_test_negative_1, 1 },
+ { utc_utilx_system_notification_level_test_negative_2, 1 },
+ // Do not remove below line
+ { NULL, 0 },
+};
+
+Display* dpy;
+Window root, win;
+
+static void startup(void)
+{
+ /* start of TC */
+ tet_printf("\n TC start");
+
+ dpy = XOpenDisplay(NULL);
+ root = XDefaultRootWindow(dpy);
+
+ win = XCreateSimpleWindow(dpy, root, 0, 0, 480, 800, 2, BlackPixel(dpy,0), WhitePixel(dpy,0));
+ XMapWindow(dpy, win);
+}
+
+static void cleanup(void)
+{
+ /* end of TC */
+ tet_printf("\n TC end");
+
+ XDestroyWindow(dpy, win);
+ XCloseDisplay(dpy);
+}
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_positive_1()
+ */
+static void utc_utilx_system_notification_level_test_positive_1(void)
+{
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_HIGH;
+
+ utilx_set_system_notification_level(dpy, win, UTILX_NOTIFICATION_LEVEL_LOW);
+ XFlush(dpy);
+
+ level = utilx_get_system_notification_level(dpy, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_LOW)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_positive_1", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_positive_1", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_positive_2()
+ */
+static void utc_utilx_system_notification_level_test_positive_2(void)
+{
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_HIGH;
+
+ utilx_set_system_notification_level(dpy, win, UTILX_NOTIFICATION_LEVEL_NORMAL);
+ XFlush(dpy);
+
+ level = utilx_get_system_notification_level(dpy, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_NORMAL)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_positive_2", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_positive_2", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_positive_3()
+ */
+static void utc_utilx_system_notification_level_test_positive_3(void)
+{
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_NORMAL;
+
+ utilx_set_system_notification_level(dpy, win, UTILX_NOTIFICATION_LEVEL_HIGH);
+ XFlush(dpy);
+
+ level = utilx_get_system_notification_level(dpy, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_HIGH)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_positive_3", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_positive_3", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_positive_4()
+ */
+static void utc_utilx_system_notification_level_test_positive_4(void)
+{
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_HIGH;
+
+ utilx_set_system_notification_level(dpy, win, 100);
+ XFlush(dpy);
+
+ level = utilx_get_system_notification_level(dpy, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_LOW)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_positive_4", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_positive_4", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_negative_1()
+ */
+static void utc_utilx_system_notification_level_test_negative_1(void)
+{
+ Ecore_X_Display *dpy2 = NULL;
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_HIGH;
+
+ // invalid display parameter
+ utilx_set_system_notification_level(dpy2, win, UTILX_NOTIFICATION_LEVEL_NORMAL);
+ XFlush(dpy);
+
+ level = utilx_get_system_notification_level(dpy, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_LOW)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_negative_1", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_negative_1", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_system_notification_level_test_negative_2()
+ */
+static void utc_utilx_system_notification_level_test_negative_2(void)
+{
+ Ecore_X_Display *dpy2 = NULL;
+ Utilx_Notification_Level level = UTILX_NOTIFICATION_LEVEL_HIGH;
+
+ utilx_set_system_notification_level(dpy, win, UTILX_NOTIFICATION_LEVEL_NORMAL);
+ XFlush(dpy);
+
+ // invalid display parameter
+ level = utilx_get_system_notification_level(dpy2, win);
+
+ if (level == UTILX_NOTIFICATION_LEVEL_LOW)
+ {
+ dts_pass("utc_utilx_system_notification_level_test_negative_2", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_system_notification_level_test_negative_2", "failed");
+ }
+}
+
diff --git a/TC/testcase/utc_utilx_opaque_test.c b/TC/testcase/utc_utilx_opaque_test.c
new file mode 100644
index 0000000..e09d4a6
--- /dev/null
+++ b/TC/testcase/utc_utilx_opaque_test.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 <tet_api.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_utilx_window_opaque_state_test_positive_1(void);
+static void utc_utilx_window_opaque_state_test_positive_2(void);
+static void utc_utilx_window_opaque_state_test_negative_1(void);
+static void utc_utilx_window_opaque_state_test_negative_2(void);
+
+
+struct tet_testlist tet_testlist[] = {
+ { utc_utilx_window_opaque_state_test_positive_1, 1 },
+ { utc_utilx_window_opaque_state_test_positive_2, 1 },
+ { utc_utilx_window_opaque_state_test_negative_1, 1 },
+ { utc_utilx_window_opaque_state_test_negative_2, 1 },
+ // Do not remove below line
+ { NULL, 0 },
+};
+
+Display* dpy;
+Window root, win;
+
+static void startup(void)
+{
+ /* start of TC */
+ tet_printf("\n TC start");
+
+ dpy = XOpenDisplay(NULL);
+ root = XDefaultRootWindow(dpy);
+
+ win = XCreateSimpleWindow(dpy, root, 0, 0, 480, 800, 2, BlackPixel(dpy,0), WhitePixel(dpy,0));
+ XMapWindow(dpy, win);
+}
+
+static void cleanup(void)
+{
+ /* end of TC */
+ tet_printf("\n TC end");
+
+ XDestroyWindow(dpy, win);
+ XCloseDisplay(dpy);
+}
+
+
+/**
+ * @brief test case of utc_utilx_window_opaque_state_test_positive_1()
+ */
+static void utc_utilx_window_opaque_state_test_positive_1(void)
+{
+ int ret;
+
+ ret = utilx_set_window_opaque_state(dpy, win, UTILX_OPAQUE_STATE_ON);
+ XFlush(dpy);
+
+ if (ret == 1)
+ {
+ dts_pass("utc_utilx_window_opaque_state_test_positive_1", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_window_opaque_state_test_positive_1", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_window_opaque_state_test_positive_2()
+ */
+static void utc_utilx_window_opaque_state_test_positive_2(void)
+{
+ int ret;
+
+ ret = utilx_set_window_opaque_state(dpy, win, UTILX_OPAQUE_STATE_OFF);
+ XFlush(dpy);
+
+ if (ret == 1)
+ {
+ dts_pass("utc_utilx_window_opaque_state_test_positive_2", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_window_opaque_state_test_positive_2", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_window_opaque_state_test_negative_1()
+ */
+static void utc_utilx_window_opaque_state_test_negative_1(void)
+{
+ int ret;
+
+ ret = utilx_set_window_opaque_state(dpy, win, 100);
+ XFlush(dpy);
+
+ if (ret == 0)
+ {
+ dts_pass("utc_utilx_window_opaque_state_test_positive_2", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_window_opaque_state_test_positive_2", "failed");
+ }
+}
+
+
+/**
+ * @brief test case of utc_utilx_window_opaque_state_test_negative_2()
+ */
+static void utc_utilx_window_opaque_state_test_negative_2(void)
+{
+ int ret;
+
+ ret = utilx_set_window_opaque_state(NULL, win, UTILX_OPAQUE_STATE_ON);
+ XFlush(dpy);
+
+ if (ret == 0)
+ {
+ dts_pass("utc_utilx_window_opaque_state_test_positive_2", "passed");
+ }
+ else
+ {
+ dts_fail("utc_utilx_window_opaque_state_test_positive_2", "failed");
+ }
+}
+
+
+
diff --git a/TC/testcase/utc_utilx_screen_shot_test.c b/TC/testcase/utc_utilx_screen_shot_test.c
new file mode 100644
index 0000000..b9755ef
--- /dev/null
+++ b/TC/testcase/utc_utilx_screen_shot_test.c
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 <tet_api.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <Ecore_Evas.h>
+#include <sys/types.h>
+#include <X11/X.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_utilx_screen_shot_test_positive_1(void);
+static void utc_utilx_screen_shot_test_positive_2(void);
+static void utc_utilx_screen_shot_test_positive_3(void);
+static void utc_utilx_screen_shot_test_negative_1(void);
+static void utc_utilx_screen_shot_test_negative_2(void);
+static void utc_utilx_screen_shot_test_negative_3(void);
+
+struct tet_testlist tet_testlist[] = {
+ { utc_utilx_screen_shot_test_positive_1, 1 },
+ { utc_utilx_screen_shot_test_positive_2, 1 },
+ { utc_utilx_screen_shot_test_positive_3, 1 },
+ { utc_utilx_screen_shot_test_negative_1, 1 },
+ { utc_utilx_screen_shot_test_negative_2, 1 },
+ { utc_utilx_screen_shot_test_negative_3, 1 },
+ // Do not remove below line
+ { NULL, 0 },
+};
+
+Display *dpy;
+int width, height;
+void *dump;
+
+static void startup(void)
+{
+ /* start of TC */
+ tet_printf("\n TC start");
+}
+
+static void cleanup(void)
+{
+ /* end of TC */
+ tet_printf("\n TC end");
+}
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_positive_1()
+ */
+static void utc_utilx_screen_shot_test_positive_1(void)
+{
+ dpy = XOpenDisplay (NULL);
+
+ dump = utilx_create_screen_shot (dpy, 720, 1280);
+
+ dts_pass ("utc_utilx_screen_shot_test_positive_1", "passed");
+
+ utilx_release_screen_shot ();
+
+ XCloseDisplay(dpy);
+}
+
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_positive_2()
+ */
+static void utc_utilx_screen_shot_test_positive_2(void)
+{
+ dpy = XOpenDisplay (NULL);
+
+ dump = utilx_create_screen_shot (dpy, 400, 400);
+
+ dts_pass ("utc_utilx_screen_shot_test_positive_2", "passed");
+
+ utilx_release_screen_shot ();
+
+ XCloseDisplay(dpy);
+}
+
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_positive_3()
+ */
+static void utc_utilx_screen_shot_test_positive_3(void)
+{
+ dpy = XOpenDisplay (NULL);
+
+ dump = utilx_create_screen_shot (dpy, 1280, 720);
+
+ dts_pass ("utc_utilx_screen_shot_test_positive_3", "passed");
+
+ utilx_release_screen_shot ();
+
+ XCloseDisplay(dpy);
+}
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_negative_1()
+ */
+static void utc_utilx_screen_shot_test_negative_1(void)
+{
+ dump = utilx_create_screen_shot (NULL, 720, 720);
+
+ if (dump == NULL)
+ dts_pass ("utc_utilx_screen_shot_test_negative_1", "passed");
+ else
+ dts_fail ("utc_utilx_screen_shot_test_negative_1", "failed");
+}
+
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_negative_2()
+ */
+static void utc_utilx_screen_shot_test_negative_2(void)
+{
+ dpy = XOpenDisplay (NULL);
+
+ dump = utilx_create_screen_shot (dpy, 0, 720);
+
+ if (dump == NULL)
+ dts_pass ("utc_utilx_screen_shot_test_negative_2", "passed");
+ else
+ dts_fail ("utc_utilx_screen_shot_test_negative_2", "failed");
+
+ XCloseDisplay(dpy);
+}
+
+
+/**
+ * @brief test case of utc_utilx_screen_shot_test_negative_3()
+ */
+static void utc_utilx_screen_shot_test_negative_3(void)
+{
+ dpy = XOpenDisplay (NULL);
+
+ dump = utilx_create_screen_shot (dpy, 720, 0);
+
+ if (dump == NULL)
+ dts_pass ("utc_utilx_screen_shot_test_negative_3", "passed");
+ else
+ dts_fail ("utc_utilx_screen_shot_test_negative_3", "failed");
+
+ XCloseDisplay(dpy);
+}
diff --git a/TC/testcase/utc_utilx_test.c b/TC/testcase/utc_utilx_test.c
deleted file mode 100644
index 7934c62..0000000
--- a/TC/testcase/utc_utilx_test.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 <tet_api.h>
-#include <X11/Xlib.h>
-#include <Ecore_X.h>
-#include <utilX.h>
-
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup)(void) = startup;
-void (*tet_cleanup)(void) = cleanup;
-
-static void utc_utilx_enable_indicator(void);
-
-
-struct tet_testlist tet_testlist[] = {
- { utc_utilx_enable_indicator, 1 },
- // Do not remove below line
- { NULL, 0 },
-};
-
-static void startup(void)
-{
- /* start of TC */
-}
-
-static void cleanup(void)
-{
- /* end of TC */
-}
-
-
-/**
- * @brief test case of utilx_enable_indicator()
- */
-static void utc_utilx_enable_indicator(void)
-{
- Display* dpy;
- Window root, win;
- int ret;
-
- dpy = XOpenDisplay(NULL);
- root = XDefaultRootWindow(dpy);
-
- win = XCreateSimpleWindow(dpy, root, 0, 0, 480, 800, 2, BlackPixel(dpy,0), WhitePixel(dpy,0));
- XMapWindow(dpy, win);
-
- // If the win want to show indicator, enables indicator.
- utilx_enable_indicator(dpy, win, 1);
- XFlush(dpy);
-
- ret = 1;
-
- if(ret)
- {
- dts_pass("utc_efl_util_set_notification_window_level_positive", "passed");
- }
- else
- {
- dts_fail("utc_efl_util_set_notification_window_level_positive", "failed");
- }
-}
-