ecore_wl2: add TC for exported shell 71/261571/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 21 Jul 2021 09:10:04 +0000 (18:10 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Wed, 21 Jul 2021 09:10:04 +0000 (18:10 +0900)
There is a requirement of sync between UI and Video.
For more information, please refer to following patch.

https://review.tizen.org/gerrit/#/c/platform/upstream/efl/+/257823/

Change-Id: I8dbd89005479220dc7f2a59a97ae2820ead9a29b

16 files changed:
TC/ecore/ecore_wl2/tslist
TC/ecore/ecore_wl2/tslist_fhub
TC/ecore/ecore_wl2/tslist_mobile
TC/ecore/ecore_wl2/tslist_tv
TC/ecore/ecore_wl2/tslist_wear
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_export.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_commit.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_handle_get.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_hide.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_move.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_above.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_below.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_resize.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_show.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_sync_set.c [new file with mode: 0644]
TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_transform_set.c [new file with mode: 0644]

index d53fdb1a6700518285d13b8aa7ec884ec9340a8a..3f8e27149f1ef8d8077126c6ee0a6a888298b468 100644 (file)
@@ -50,3 +50,14 @@ utc_ecore_wl2_subsurface_video_surface_destination_set.c
 utc_ecore_wl2_subsurface_video_surface_prepare.c
 utc_ecore_wl2_subsurface_video_surface_rotation_set.c
 utc_ecore_wl2_subsurface_aux_hint_set.c
+utc_ecore_wl2_subsurface_export.c
+utc_ecore_wl2_subsurface_exported_surface_handle_get.c
+utc_ecore_wl2_subsurface_exported_surface_show.c
+utc_ecore_wl2_subsurface_exported_surface_hide.c
+utc_ecore_wl2_subsurface_exported_surface_place_above.c
+utc_ecore_wl2_subsurface_exported_surface_place_below.c
+utc_ecore_wl2_subsurface_exported_surface_move.c
+utc_ecore_wl2_subsurface_exported_surface_resize.c
+utc_ecore_wl2_subsurface_exported_surface_transform_set.c
+utc_ecore_wl2_subsurface_exported_surface_sync_set.c
+utc_ecore_wl2_subsurface_exported_surface_commit.c
index cb4f490d3866e3769e9bcffd7bfc45bbd0427da7..ce2d3ff8b860203b225d7ab15aa79ad3b2cefa8c 100644 (file)
@@ -50,3 +50,14 @@ utc_ecore_wl2_subsurface_video_surface_destination_set.c
 utc_ecore_wl2_subsurface_video_surface_prepare.c
 utc_ecore_wl2_subsurface_video_surface_rotation_set.c
 utc_ecore_wl2_subsurface_aux_hint_set.c
+utc_ecore_wl2_subsurface_export.c
+utc_ecore_wl2_subsurface_exported_surface_handle_get.c
+utc_ecore_wl2_subsurface_exported_surface_show.c
+utc_ecore_wl2_subsurface_exported_surface_hide.c
+utc_ecore_wl2_subsurface_exported_surface_place_above.c
+utc_ecore_wl2_subsurface_exported_surface_place_below.c
+utc_ecore_wl2_subsurface_exported_surface_move.c
+utc_ecore_wl2_subsurface_exported_surface_resize.c
+utc_ecore_wl2_subsurface_exported_surface_transform_set.c
+utc_ecore_wl2_subsurface_exported_surface_sync_set.c
+utc_ecore_wl2_subsurface_exported_surface_commit.c
index d53fdb1a6700518285d13b8aa7ec884ec9340a8a..3f8e27149f1ef8d8077126c6ee0a6a888298b468 100644 (file)
@@ -50,3 +50,14 @@ utc_ecore_wl2_subsurface_video_surface_destination_set.c
 utc_ecore_wl2_subsurface_video_surface_prepare.c
 utc_ecore_wl2_subsurface_video_surface_rotation_set.c
 utc_ecore_wl2_subsurface_aux_hint_set.c
+utc_ecore_wl2_subsurface_export.c
+utc_ecore_wl2_subsurface_exported_surface_handle_get.c
+utc_ecore_wl2_subsurface_exported_surface_show.c
+utc_ecore_wl2_subsurface_exported_surface_hide.c
+utc_ecore_wl2_subsurface_exported_surface_place_above.c
+utc_ecore_wl2_subsurface_exported_surface_place_below.c
+utc_ecore_wl2_subsurface_exported_surface_move.c
+utc_ecore_wl2_subsurface_exported_surface_resize.c
+utc_ecore_wl2_subsurface_exported_surface_transform_set.c
+utc_ecore_wl2_subsurface_exported_surface_sync_set.c
+utc_ecore_wl2_subsurface_exported_surface_commit.c
index d53fdb1a6700518285d13b8aa7ec884ec9340a8a..3f8e27149f1ef8d8077126c6ee0a6a888298b468 100644 (file)
@@ -50,3 +50,14 @@ utc_ecore_wl2_subsurface_video_surface_destination_set.c
 utc_ecore_wl2_subsurface_video_surface_prepare.c
 utc_ecore_wl2_subsurface_video_surface_rotation_set.c
 utc_ecore_wl2_subsurface_aux_hint_set.c
+utc_ecore_wl2_subsurface_export.c
+utc_ecore_wl2_subsurface_exported_surface_handle_get.c
+utc_ecore_wl2_subsurface_exported_surface_show.c
+utc_ecore_wl2_subsurface_exported_surface_hide.c
+utc_ecore_wl2_subsurface_exported_surface_place_above.c
+utc_ecore_wl2_subsurface_exported_surface_place_below.c
+utc_ecore_wl2_subsurface_exported_surface_move.c
+utc_ecore_wl2_subsurface_exported_surface_resize.c
+utc_ecore_wl2_subsurface_exported_surface_transform_set.c
+utc_ecore_wl2_subsurface_exported_surface_sync_set.c
+utc_ecore_wl2_subsurface_exported_surface_commit.c
index d53fdb1a6700518285d13b8aa7ec884ec9340a8a..3f8e27149f1ef8d8077126c6ee0a6a888298b468 100644 (file)
@@ -50,3 +50,14 @@ utc_ecore_wl2_subsurface_video_surface_destination_set.c
 utc_ecore_wl2_subsurface_video_surface_prepare.c
 utc_ecore_wl2_subsurface_video_surface_rotation_set.c
 utc_ecore_wl2_subsurface_aux_hint_set.c
+utc_ecore_wl2_subsurface_export.c
+utc_ecore_wl2_subsurface_exported_surface_handle_get.c
+utc_ecore_wl2_subsurface_exported_surface_show.c
+utc_ecore_wl2_subsurface_exported_surface_hide.c
+utc_ecore_wl2_subsurface_exported_surface_place_above.c
+utc_ecore_wl2_subsurface_exported_surface_place_below.c
+utc_ecore_wl2_subsurface_exported_surface_move.c
+utc_ecore_wl2_subsurface_exported_surface_resize.c
+utc_ecore_wl2_subsurface_exported_surface_transform_set.c
+utc_ecore_wl2_subsurface_exported_surface_sync_set.c
+utc_ecore_wl2_subsurface_exported_surface_commit.c
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_export.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_export.c
new file mode 100644 (file)
index 0000000..75ef211
--- /dev/null
@@ -0,0 +1,157 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_export ecore_wl2_subsurface_export()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_export
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_export_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_export
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_export with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_export_n)
+{
+   Eina_Bool ret;
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ret = ecore_wl2_subsurface_export(NULL);
+
+   if (ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        return;
+     }
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_export()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_export_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_export_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_commit.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_commit.c
new file mode 100644 (file)
index 0000000..f599862
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_commit ecore_wl2_subsurface_exported_surface_commit()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_commit(ss);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_commit
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_commit_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_commit
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_commit with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_commit_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_commit(NULL);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_commit()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_commit_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_commit_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_handle_get.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_handle_get.c
new file mode 100644 (file)
index 0000000..f0b40c2
--- /dev/null
@@ -0,0 +1,165 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_handle_get ecore_wl2_subsurface_exported_surface_handle_get()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   const char *esh = NULL;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   esh = ecore_wl2_subsurface_exported_surface_handle_get(ss);
+   if (!esh)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_handle_get
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_handle_get_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_handle_get
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_handle_get with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_handle_get_n)
+{
+   const char *esh = NULL;
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   esh = ecore_wl2_subsurface_exported_surface_handle_get(NULL);
+
+   if (esh)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        return;
+     }
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_handle_get()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_handle_get_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_handle_get_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_hide.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_hide.c
new file mode 100644 (file)
index 0000000..a69814b
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_hide ecore_wl2_subsurface_exported_surface_hide()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_hide(ss);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_hide
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_hide_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_hide
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_hide with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_hide_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_hide(NULL);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_hide()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_hide_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_hide_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_move.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_move.c
new file mode 100644 (file)
index 0000000..92ca2b8
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_move ecore_wl2_subsurface_exported_surface_move()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_move(ss, 100, 100);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_move
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_move_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_move
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_move with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_move_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_move(NULL, 0, 0);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_move()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_move_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_move_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_above.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_above.c
new file mode 100644 (file)
index 0000000..c203c3b
--- /dev/null
@@ -0,0 +1,166 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_place_above ecore_wl2_subsurface_exported_surface_place_above()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss, *other;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   other = ecore_wl2_subsurface_new(win);
+   if (!other)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(other);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_place_above(ss, other);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_place_above
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_place_above_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_place_above
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_place_above with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_place_above_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_place_above(NULL, NULL);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_place_above()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_place_above_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_place_above_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_below.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_place_below.c
new file mode 100644 (file)
index 0000000..4fc9960
--- /dev/null
@@ -0,0 +1,166 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_place_below ecore_wl2_subsurface_exported_surface_place_below()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss, *other;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   other = ecore_wl2_subsurface_new(win);
+   if (!other)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(other);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_place_below(ss, other);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_place_below
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_place_below_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_place_below
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_place_below with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_place_below_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_place_below(NULL, NULL);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_place_below()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_place_below_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_place_below_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_resize.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_resize.c
new file mode 100644 (file)
index 0000000..d9f21aa
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_resize ecore_wl2_subsurface_exported_surface_resize()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_resize(ss, 100, 100);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_resize
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_resize_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_resize
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_resize with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_resize_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_resize(NULL, 0, 0);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_resize()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_resize_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_resize_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_show.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_show.c
new file mode 100644 (file)
index 0000000..e306967
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_show ecore_wl2_subsurface_exported_surface_show()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_show(ss);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_show
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_show_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_show
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_show with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_show_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_show(NULL);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_show()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_show_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_show_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_sync_set.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_sync_set.c
new file mode 100644 (file)
index 0000000..c549585
--- /dev/null
@@ -0,0 +1,152 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_sync_set ecore_wl2_subsurface_exported_surface_sync_set()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_sync_set(ss, EINA_FALSE);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_sync_set
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_sync_set_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_sync_set
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_sync_set with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_sync_set_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_sync_set(NULL, 0);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_sync_set()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_sync_set_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_sync_set_n);
+   return tcase;
+}
diff --git a/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_transform_set.c b/TC/ecore/ecore_wl2/utc_ecore_wl2_subsurface_exported_surface_transform_set.c
new file mode 100644 (file)
index 0000000..607b498
--- /dev/null
@@ -0,0 +1,155 @@
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wayland2.h> // use managed header instead of Ecore_Wl2.h
+#include "utc_ecore_wl2_common.h"
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_exported_surface_transform_set ecore_wl2_subsurface_exported_surface_transform_set()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   if (ecore_wl2_init())
+     {
+        startup_status = EINA_TRUE;
+     }
+}
+
+static void
+teardown(void)
+{
+   ecore_wl2_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   Eina_Bool ret;
+   Ecore_Wl2_Subsurface *ss;
+   Ecore_Wl2_Display *ewd = NULL;
+   //Connect the display.
+   ewd  = ecore_wl2_display_connect(NULL);
+   if (!ewd)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   if (CHECK_TV_PROFILE()) ecore_wl2_display_sync(ewd);
+
+   Ecore_Wl2_Window *win = NULL;
+   win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+   if (!win)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ss = ecore_wl2_subsurface_new(win);
+   if (!ss)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ret = ecore_wl2_subsurface_export(ss);
+   if (!ret)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+        goto quit_main_loop;
+     }
+
+   ecore_wl2_subsurface_exported_surface_transform_set(ss, 0);
+   ecore_wl2_subsurface_exported_surface_transform_set(ss, 1);
+   ecore_wl2_subsurface_exported_surface_transform_set(ss, 2);
+   ecore_wl2_subsurface_exported_surface_transform_set(ss, 3);
+
+quit_main_loop:
+   ecore_main_loop_quit();
+
+   return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_transform_set
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_transform_set_p)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+   if (!timer_exit)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ecore_main_loop_begin();
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_exported_surface_transform_set
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_exported_surface_transform_set with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_exported_surface_transform_set_n)
+{
+   if (startup_status != EINA_TRUE)
+     {
+        ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+        return;
+     }
+
+   ecore_wl2_subsurface_exported_surface_transform_set(NULL, 0);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_exported_surface_transform_set()
+{
+   TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_export");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_transform_set_p);
+   tcase_add_test(tcase, utc_ecore_wl2_subsurface_exported_surface_transform_set_n);
+   return tcase;
+}