From 9c2eed1d5584f25711ebb9309ac620c02118760e Mon Sep 17 00:00:00 2001 From: junkyu han Date: Thu, 18 May 2017 17:13:57 +0900 Subject: Change file name to moments_state_view.c -> moments_status_view_ui.c Change-Id: I3433b984ef6660e5971676bef7b95052d9571050 --- CMakeLists.txt | 2 +- test/feature_test/feature_test.c | 2 +- test/feature_test/feature_test.h | 2 +- .../group_feature_moments_status_view.c | 299 --------------------- .../group_feature_moments_status_view_ui.c | 299 +++++++++++++++++++++ 5 files changed, 302 insertions(+), 302 deletions(-) delete mode 100644 test/feature_test/group_feature_moments_status_view.c create mode 100644 test/feature_test/group_feature_moments_status_view_ui.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 540d54e..394645a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,7 +226,7 @@ ADD_EXECUTABLE(${PROJECT_NAME} test/feature_test/group_feature_moments_pull_down.c test/feature_test/group_feature_moments_default_ui.c test/feature_test/group_feature_moments_vi.c - test/feature_test/group_feature_moments_status_view.c + test/feature_test/group_feature_moments_status_view_ui.c test/feature_test/group_feature_moments_controls_view.c test/unit/unit_assert.c diff --git a/test/feature_test/feature_test.c b/test/feature_test/feature_test.c index 8d5c2f5..3dabe72 100755 --- a/test/feature_test/feature_test.c +++ b/test/feature_test/feature_test.c @@ -17,7 +17,7 @@ void feature_test(void) TEST_GROUP_ADD("group_feature_status_area_layer_show", group_feature_status_area_layer_show); TEST_GROUP_ADD("group_feature_moments_default_ui", group_feature_moments_default_ui); TEST_GROUP_ADD("group_feature_moments_vi", group_feature_moments_vi); - TEST_GROUP_ADD("group_feature_moments_status_view_create", group_feature_moments_status_view_create); + TEST_GROUP_ADD("group_feature_moments_status_view_ui", group_feature_moments_status_view_ui); TEST_GROUP_ADD("group_feature_moments_controls_show", group_feature_moments_controls_show); TEST_RUN(__test_complete_cb); diff --git a/test/feature_test/feature_test.h b/test/feature_test/feature_test.h index a7e8cf3..eb3b8f6 100755 --- a/test/feature_test/feature_test.h +++ b/test/feature_test/feature_test.h @@ -14,7 +14,7 @@ void group_feature_status_area_layer_show(unit_group_t * group); void group_feature_moments_pull_down(unit_group_t * group); void group_feature_moments_default_ui(unit_group_t * group); void group_feature_moments_vi(unit_group_t * group); -void group_feature_moments_status_view_create(unit_group_t * group); +void group_feature_moments_status_view_ui(unit_group_t * group); void group_feature_moments_controls_show(unit_group_t * group); #endif diff --git a/test/feature_test/group_feature_moments_status_view.c b/test/feature_test/group_feature_moments_status_view.c deleted file mode 100644 index 6be257d..0000000 --- a/test/feature_test/group_feature_moments_status_view.c +++ /dev/null @@ -1,299 +0,0 @@ -#include "test.h" -#if TEST_MODE - -#include "home_app_manager.h" -#include "feature_test.h" -#include "moments/moments.h" -#include "moments/moments_view.h" -#include "moments/moments_status_view.h" -#include "home_app_manager.h" -#include "common_conf.h" -#include "moments/moments_view_conf.h" - -#include -#include - -#define STATUS_LAYOUT_EDJE "/usr/apps/org.tizen.w-home/res/edje/circle/moments_status_layout.edj" -#define STATUS_CONTENT "status_content" - -extern Evas_Object *__t__get_moments_view_base_window(void); -extern Evas_Object *__t__get_moments_status_grid(void); -extern Evas_Object *__t__get_moments_status_battery(void); -extern Evas_Object *__t__get_moments_status_callsignal(void); -extern void __t__moments_restore_status_battery(void); -extern void __t__moments_restore_status_callsignal(void); -extern void __t__layout_mouse_down(Evas_Object *layout, int down_x, int down_y); -extern void __t__layout_mouse_up(Evas_Object *layout, int down_x, int down_y); - -static void __case_check_status_view_layout(bool * is_passed); -static void __case_check_status_view_battery(bool * is_passed); -static void __case_check_status_view_callsignal(bool * is_passed); -static void __case_check_status_battery_icon_change(bool * is_passed); -static void __case_check_status_callsignal_icon_change(bool * is_passed); - -static struct { - int before_step_battery_text; - int before_step_battery_percent; - bool before_step_battery_charging; - int callsignal_index; - int current_step; - Ecore_Timer * group_timer; - unit_group_t * group; - int current_case; - void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed); -} s_info = { - .before_step_battery_text = 0, - .before_step_battery_percent = 0, - .before_step_battery_charging = false, - .callsignal_index = 0, - .current_step = 0, - .group_timer = NULL, - .group = NULL, - .current_case = 0, - .case_pool = { - __case_check_status_view_layout, - __case_check_status_view_battery, - __case_check_status_view_callsignal, - __case_check_status_battery_icon_change, - __case_check_status_callsignal_icon_change, - NULL, - }, -}; - -static char *__t__callsignal_type[13] = { - "default", - "call_signal_00", - "call_signal_01", - "call_signal_02", - "call_signal_03", - "call_signal_04", - "roaming_call_signal_00", - "roaming_call_signal_01", - "roaming_call_signal_02", - "roaming_call_signal_03", - "roaming_call_signal_04", - "flight_mode" -}; - -static Eina_Bool __group_timer_callback(void * data); - -static void __set_up(void) {} - -static void __tear_down(void) {} - -static void __case_check_status_view_layout(bool * is_passed) -{ - Evas_Object *win = __t__get_moments_view_base_window(); - TEST_ASSERT_TRUE(win != NULL); - - Evas_Object *layout = get_moments_status_layout(); - TEST_ASSERT_TRUE(layout != NULL); - const char *status_layout_file = NULL; - elm_layout_file_get(layout, &status_layout_file, NULL); - TEST_ASSERT_EQUAL_STRING(STATUS_LAYOUT_EDJE, status_layout_file); - TEST_ASSERT_TRUE(!evas_object_visible_get(layout)); - int x, y, w, h; - evas_object_geometry_get(layout, &x, &y, &w, &h); - TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x); - TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y); - TEST_ASSERT_EQUAL_INT(WINDOW_W, w); - TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h); - - Evas_Object *grid = __t__get_moments_status_grid(); - TEST_ASSERT_TRUE(grid != NULL); - TEST_ASSERT_TRUE(elm_object_part_content_get(layout, STATUS_CONTENT) != NULL); - evas_object_geometry_get(grid, &x, &y, &w, &h); - TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x); - TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y); - TEST_ASSERT_EQUAL_INT(WINDOW_W, w); - TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h); - - *is_passed = true; -} - -static void __case_check_status_view_battery(bool * is_passed) -{ - Evas_Object *battery = __t__get_moments_status_battery(); - TEST_ASSERT_TRUE(battery != NULL); - TEST_ASSERT_TRUE(evas_object_visible_get(battery)); - int x, y, w, h; - evas_object_geometry_get(battery, &x, &y, &w, &h); - TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x); - TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h); - - *is_passed = true; -} - -#if 0 -static void __case_check_status_view_call_signal(bool * is_passed) -{ - Evas_Object *battery = __t__get_moments_status_call_signal(); - TEST_ASSERT_TRUE(call_signal!= NULL); - TEST_ASSERT_TRUE(evas_object_visible_get(call_signal)); - int x, y, w, h; - evas_object_geometry_get(call_signal, &x, &y, &w, &h); - TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_UTIL_POSITION_X, x); - TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_UTIL_FIXED_POSITION_Y, y); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_W, w); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_H, h); - - *is_passed = true; -} -#endif - -static void __case_check_status_battery_icon_change(bool * is_passed) -{ - double val = 0.0; - char battery_text[5] = {0, }; - char battery_percent[PATH_MAX] = {0, }; - - main_s *info = main_get_info(); - TEST_ASSERT_TRUE(info != NULL); - TEST_ASSERT_TRUE(info->layout != NULL); - - Evas_Object *layout = get_moments_status_layout(); - TEST_ASSERT_TRUE(layout != NULL); - if (s_info.current_step == 0) { - TEST_ASSERT_TRUE(evas_object_visible_get(layout) != true); - } - - Evas_Object *battery = __t__get_moments_status_battery(); - TEST_ASSERT_TRUE(battery != NULL); - - if (s_info.current_step == 0) { - __t__layout_mouse_down(info->layout, 180, 50); - TEST_ASSERT_TRUE(evas_object_visible_get(layout) == true); - } - - if (s_info.current_step > 0) { - snprintf(battery_text, sizeof(battery_text), "%d%%", s_info.before_step_battery_text); - snprintf(battery_percent, sizeof(battery_percent), "battery_percent_%02d", s_info.before_step_battery_percent); - - TEST_ASSERT_EQUAL_STRING(battery_text, elm_object_part_text_get(layout, "txt.battery")); - TEST_ASSERT_EQUAL_STRING(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val)); - if (s_info.before_step_battery_charging) { - TEST_ASSERT_EQUAL_STRING("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val)); - } else { - TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val)); - } - } - - if (s_info.current_step < 21) { - s_info.before_step_battery_text = s_info.current_step * 5; - s_info.before_step_battery_percent = s_info.current_step * 5; - s_info.before_step_battery_charging = s_info.current_step % 2 ? true : false; - - moments_status_battery_update(s_info.before_step_battery_text, s_info.before_step_battery_percent, s_info.before_step_battery_charging); - - s_info.current_step += 1; - s_info.current_case -= 1; - } else { - __t__moments_restore_status_battery(); - s_info.current_step = -1; - } - - *is_passed = true; -} - -static void __case_check_status_view_callsignal(bool * is_passed) -{ - Evas_Object *callsignal = __t__get_moments_status_callsignal(); - if (moments_check_is_3g_device()) { - TEST_ASSERT_TRUE(callsignal != NULL); - TEST_ASSERT_TRUE(evas_object_visible_get(callsignal)); - - int x, y, w, h; - evas_object_geometry_get(callsignal, &x, &y, &w, &h); - TEST_ASSERT_EQUAL_INT(OUTSIDE_X + 135, x); - TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + 7, y); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_W, w); - TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_H, h); - } else { - TEST_ASSERT_TRUE(callsignal == NULL); - } - - *is_passed = true; -} - -bool is_roaming_test = false; -static void __case_check_status_callsignal_icon_change(bool * is_passed) -{ - double val = 0.0; - main_s *info = main_get_info(); - TEST_ASSERT_TRUE(info != NULL); - TEST_ASSERT_TRUE(info->layout != NULL); - - Evas_Object *layout = get_moments_status_layout(); - TEST_ASSERT_TRUE(layout != NULL); - - Evas_Object *callsignal = __t__get_moments_status_callsignal(); - TEST_ASSERT_TRUE(callsignal != NULL); - - if (s_info.current_step >= 0) { - TEST_ASSERT_EQUAL_STRING(__t__callsignal_type[s_info.callsignal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val)); - - s_info.callsignal_index += 1; - } - - if (s_info.current_step < 5) { - int strength = s_info.current_step; - - moments_status_callsignal_update(strength, is_roaming_test); - - if (!is_roaming_test && s_info.current_step == 4) { - is_roaming_test = true; - s_info.current_step = -1; - } - - s_info.current_step += 1; - s_info.current_case -= 1; - } else if (s_info.current_step == 5 && is_roaming_test) { - int strength = s_info.current_step; - - moments_status_callsignal_update(strength, !is_roaming_test); - - s_info.current_step += 1; - s_info.current_case -= 1; - } else { - __t__layout_mouse_up(info->layout, 0, 0); - __t__moments_restore_status_callsignal(); - s_info.current_step = 0; - s_info.callsignal_index = 0; - is_roaming_test = false; - } - - *is_passed = true; -} - -void group_feature_moments_status_view_create(unit_group_t * group) -{ - if (s_info.group_timer) { - ecore_timer_del(s_info.group_timer); - s_info.group_timer = NULL; - } - - s_info.current_step = 0; - s_info.current_case = 0; - s_info.group = group; - s_info.group_timer = ecore_timer_add(0.6, __group_timer_callback, NULL); -} - -static Eina_Bool __group_timer_callback(void * data) -{ - if (s_info.case_pool[s_info.current_case] == NULL) { - s_info.group->finish(s_info.group); - - s_info.group_timer = NULL; - return ECORE_CALLBACK_CANCEL; - } - - TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]); - s_info.current_case += 1; - - return ECORE_CALLBACK_RENEW; -} - -#endif - diff --git a/test/feature_test/group_feature_moments_status_view_ui.c b/test/feature_test/group_feature_moments_status_view_ui.c new file mode 100644 index 0000000..c825dd0 --- /dev/null +++ b/test/feature_test/group_feature_moments_status_view_ui.c @@ -0,0 +1,299 @@ +#include "test.h" +#if TEST_MODE + +#include "home_app_manager.h" +#include "feature_test.h" +#include "moments/moments.h" +#include "moments/moments_view.h" +#include "moments/moments_status_view.h" +#include "home_app_manager.h" +#include "common_conf.h" +#include "moments/moments_view_conf.h" + +#include +#include + +#define STATUS_LAYOUT_EDJE "/usr/apps/org.tizen.w-home/res/edje/circle/moments_status_layout.edj" +#define STATUS_CONTENT "status_content" + +extern Evas_Object *__t__get_moments_view_base_window(void); +extern Evas_Object *__t__get_moments_status_grid(void); +extern Evas_Object *__t__get_moments_status_battery(void); +extern Evas_Object *__t__get_moments_status_callsignal(void); +extern void __t__moments_restore_status_battery(void); +extern void __t__moments_restore_status_callsignal(void); +extern void __t__layout_mouse_down(Evas_Object *layout, int down_x, int down_y); +extern void __t__layout_mouse_up(Evas_Object *layout, int down_x, int down_y); + +static void __case_check_status_view_layout(bool * is_passed); +static void __case_check_status_view_battery(bool * is_passed); +static void __case_check_status_view_callsignal(bool * is_passed); +static void __case_check_status_battery_icon_change(bool * is_passed); +static void __case_check_status_callsignal_icon_change(bool * is_passed); + +static struct { + int before_step_battery_text; + int before_step_battery_percent; + bool before_step_battery_charging; + int callsignal_index; + int current_step; + Ecore_Timer * group_timer; + unit_group_t * group; + int current_case; + void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed); +} s_info = { + .before_step_battery_text = 0, + .before_step_battery_percent = 0, + .before_step_battery_charging = false, + .callsignal_index = 0, + .current_step = 0, + .group_timer = NULL, + .group = NULL, + .current_case = 0, + .case_pool = { + __case_check_status_view_layout, + __case_check_status_view_battery, + __case_check_status_view_callsignal, + __case_check_status_battery_icon_change, + __case_check_status_callsignal_icon_change, + NULL, + }, +}; + +static char *__t__callsignal_type[13] = { + "default", + "call_signal_00", + "call_signal_01", + "call_signal_02", + "call_signal_03", + "call_signal_04", + "roaming_call_signal_00", + "roaming_call_signal_01", + "roaming_call_signal_02", + "roaming_call_signal_03", + "roaming_call_signal_04", + "flight_mode" +}; + +static Eina_Bool __group_timer_callback(void * data); + +static void __set_up(void) {} + +static void __tear_down(void) {} + +static void __case_check_status_view_layout(bool * is_passed) +{ + Evas_Object *win = __t__get_moments_view_base_window(); + TEST_ASSERT_TRUE(win != NULL); + + Evas_Object *layout = get_moments_status_layout(); + TEST_ASSERT_TRUE(layout != NULL); + const char *status_layout_file = NULL; + elm_layout_file_get(layout, &status_layout_file, NULL); + TEST_ASSERT_EQUAL_STRING(STATUS_LAYOUT_EDJE, status_layout_file); + TEST_ASSERT_TRUE(!evas_object_visible_get(layout)); + int x, y, w, h; + evas_object_geometry_get(layout, &x, &y, &w, &h); + TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x); + TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y); + TEST_ASSERT_EQUAL_INT(WINDOW_W, w); + TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h); + + Evas_Object *grid = __t__get_moments_status_grid(); + TEST_ASSERT_TRUE(grid != NULL); + TEST_ASSERT_TRUE(elm_object_part_content_get(layout, STATUS_CONTENT) != NULL); + evas_object_geometry_get(grid, &x, &y, &w, &h); + TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x); + TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y); + TEST_ASSERT_EQUAL_INT(WINDOW_W, w); + TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h); + + *is_passed = true; +} + +static void __case_check_status_view_battery(bool * is_passed) +{ + Evas_Object *battery = __t__get_moments_status_battery(); + TEST_ASSERT_TRUE(battery != NULL); + TEST_ASSERT_TRUE(evas_object_visible_get(battery)); + int x, y, w, h; + evas_object_geometry_get(battery, &x, &y, &w, &h); + TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x); + TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h); + + *is_passed = true; +} + +#if 0 +static void __case_check_status_view_call_signal(bool * is_passed) +{ + Evas_Object *battery = __t__get_moments_status_call_signal(); + TEST_ASSERT_TRUE(call_signal!= NULL); + TEST_ASSERT_TRUE(evas_object_visible_get(call_signal)); + int x, y, w, h; + evas_object_geometry_get(call_signal, &x, &y, &w, &h); + TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_UTIL_POSITION_X, x); + TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_UTIL_FIXED_POSITION_Y, y); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_W, w); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_H, h); + + *is_passed = true; +} +#endif + +static void __case_check_status_battery_icon_change(bool * is_passed) +{ + double val = 0.0; + char battery_text[5] = {0, }; + char battery_percent[PATH_MAX] = {0, }; + + main_s *info = main_get_info(); + TEST_ASSERT_TRUE(info != NULL); + TEST_ASSERT_TRUE(info->layout != NULL); + + Evas_Object *layout = get_moments_status_layout(); + TEST_ASSERT_TRUE(layout != NULL); + if (s_info.current_step == 0) { + TEST_ASSERT_TRUE(evas_object_visible_get(layout) != true); + } + + Evas_Object *battery = __t__get_moments_status_battery(); + TEST_ASSERT_TRUE(battery != NULL); + + if (s_info.current_step == 0) { + __t__layout_mouse_down(info->layout, 180, 50); + TEST_ASSERT_TRUE(evas_object_visible_get(layout) == true); + } + + if (s_info.current_step > 0) { + snprintf(battery_text, sizeof(battery_text), "%d%%", s_info.before_step_battery_text); + snprintf(battery_percent, sizeof(battery_percent), "battery_percent_%02d", s_info.before_step_battery_percent); + + TEST_ASSERT_EQUAL_STRING(battery_text, elm_object_part_text_get(layout, "txt.battery")); + TEST_ASSERT_EQUAL_STRING(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val)); + if (s_info.before_step_battery_charging) { + TEST_ASSERT_EQUAL_STRING("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val)); + } else { + TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val)); + } + } + + if (s_info.current_step < 21) { + s_info.before_step_battery_text = s_info.current_step * 5; + s_info.before_step_battery_percent = s_info.current_step * 5; + s_info.before_step_battery_charging = s_info.current_step % 2 ? true : false; + + moments_status_battery_update(s_info.before_step_battery_text, s_info.before_step_battery_percent, s_info.before_step_battery_charging); + + s_info.current_step += 1; + s_info.current_case -= 1; + } else { + __t__moments_restore_status_battery(); + s_info.current_step = -1; + } + + *is_passed = true; +} + +static void __case_check_status_view_callsignal(bool * is_passed) +{ + Evas_Object *callsignal = __t__get_moments_status_callsignal(); + if (moments_check_is_3g_device()) { + TEST_ASSERT_TRUE(callsignal != NULL); + TEST_ASSERT_TRUE(evas_object_visible_get(callsignal)); + + int x, y, w, h; + evas_object_geometry_get(callsignal, &x, &y, &w, &h); + TEST_ASSERT_EQUAL_INT(OUTSIDE_X + 135, x); + TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + 7, y); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_W, w); + TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_UTIL_ICON_H, h); + } else { + TEST_ASSERT_TRUE(callsignal == NULL); + } + + *is_passed = true; +} + +bool is_roaming_test = false; +static void __case_check_status_callsignal_icon_change(bool * is_passed) +{ + double val = 0.0; + main_s *info = main_get_info(); + TEST_ASSERT_TRUE(info != NULL); + TEST_ASSERT_TRUE(info->layout != NULL); + + Evas_Object *layout = get_moments_status_layout(); + TEST_ASSERT_TRUE(layout != NULL); + + Evas_Object *callsignal = __t__get_moments_status_callsignal(); + TEST_ASSERT_TRUE(callsignal != NULL); + + if (s_info.current_step >= 0) { + TEST_ASSERT_EQUAL_STRING(__t__callsignal_type[s_info.callsignal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val)); + + s_info.callsignal_index += 1; + } + + if (s_info.current_step < 5) { + int strength = s_info.current_step; + + moments_status_callsignal_update(strength, is_roaming_test); + + if (!is_roaming_test && s_info.current_step == 4) { + is_roaming_test = true; + s_info.current_step = -1; + } + + s_info.current_step += 1; + s_info.current_case -= 1; + } else if (s_info.current_step == 5 && is_roaming_test) { + int strength = s_info.current_step; + + moments_status_callsignal_update(strength, !is_roaming_test); + + s_info.current_step += 1; + s_info.current_case -= 1; + } else { + __t__layout_mouse_up(info->layout, 0, 0); + __t__moments_restore_status_callsignal(); + s_info.current_step = 0; + s_info.callsignal_index = 0; + is_roaming_test = false; + } + + *is_passed = true; +} + +void group_feature_moments_status_view_ui(unit_group_t * group) +{ + if (s_info.group_timer) { + ecore_timer_del(s_info.group_timer); + s_info.group_timer = NULL; + } + + s_info.current_step = 0; + s_info.current_case = 0; + s_info.group = group; + s_info.group_timer = ecore_timer_add(0.1, __group_timer_callback, NULL); +} + +static Eina_Bool __group_timer_callback(void * data) +{ + if (s_info.case_pool[s_info.current_case] == NULL) { + s_info.group->finish(s_info.group); + + s_info.group_timer = NULL; + return ECORE_CALLBACK_CANCEL; + } + + TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]); + s_info.current_case += 1; + + return ECORE_CALLBACK_RENEW; +} + +#endif + -- cgit v1.2.3