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
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
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
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
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
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
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}
--- /dev/null
+#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;
+}