efl_ui_animation_view: remove redundant api calls. 88/211188/1
authorHermet Park <hermetpark@gmail.com>
Wed, 31 Jul 2019 04:22:23 +0000 (13:22 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 31 Jul 2019 04:22:23 +0000 (13:22 +0900)
Verify only verify stop behavior.

Change-Id: I6559819ab662715dc044e28fca2907dcbe695eaa

TC/elementary/animation_view/utc_elm_animation_view_stop.c

index a3b8920ad626e1cd7eeb367e7a7808db8427544f..beb3d3c941fcd04dafe84fa4dad27aaa307f41b6 100644 (file)
@@ -55,35 +55,17 @@ teardown(void)
    printf(" ============ Cleanup ============ \n");
 }
 
-static void _play_start_cb(void *data, Evas_Object *obj, void *event_info)
+static void _play_update_cb(void *data, Evas_Object *obj, void *event_info)
 {
-   Evas_Object *anim_view = data;
-   elm_animation_view_pause(anim_view);
-}
-
-static void _play_pause_cb(void *data, Evas_Object *obj, void *event_info)
-{
-   Evas_Object *anim_view = data;
-   elm_animation_view_resume(anim_view);
-}
-
-static void _play_resume_cb(void *data, Evas_Object *obj, void *event_info)
-{
-   Evas_Object *anim_view = data;
-   elm_animation_view_stop(anim_view);
-}
-
-static void _play_stop_cb(void *data, Evas_Object *obj, void *event_info)
-{
-   ret_stopped_well = EINA_TRUE;
-}
-
-static void _play_done_cb(void *data, Evas_Object *obj, void *event_info)
-{
-   elm_exit();
+   double progress = elm_animation_view_progress_get(obj);
+   if (progress > 0.5)
+     {
+        ret_stopped_well = EINA_TRUE;
+        elm_animation_view_stop(obj);
+        elm_exit();
+     }
 }
 
-
 /**
  * @addtogroup elm_animation_view_stop
  * @{
@@ -116,11 +98,7 @@ START_TEST(utc_elm_animation_view_stop_p)
         return;
      }
 
-   evas_object_smart_callback_add(anim_view, "play,start", _play_start_cb, anim_view);
-   evas_object_smart_callback_add(anim_view, "play,pause", _play_pause_cb, anim_view);
-   evas_object_smart_callback_add(anim_view, "play,resume", _play_resume_cb, anim_view);
-   evas_object_smart_callback_add(anim_view, "play,stop", _play_stop_cb, anim_view);
-   evas_object_smart_callback_add(anim_view, "play,stop", _play_stop_cb, anim_view);
+   evas_object_smart_callback_add(anim_view, "play,update", _play_update_cb, anim_view);
 
    evas_object_show(anim_view);
    elm_animation_view_play(anim_view);