Ecore_evas_buffer: Fix wrong usage of ecore_evas_buffer_render
authorYeongjong Lee <yj34.lee@samsung.com>
Thu, 2 Aug 2018 10:58:46 +0000 (19:58 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Mon, 6 Aug 2018 03:06:16 +0000 (12:06 +0900)
Render_pre/post should be called only if rendering happens. we can't expect to
be called render_post callback after ecore_main_loop_begin because evas won't
render canvas.(there is no change of canvas)

See also, https://review.tizen.org/gerrit/#/c/185175/

Change-Id: Ie3aa5ebd862886a3d48fc1af0e98ef9355503bff
Signed-off-by: Yeongjong Lee <yj34.lee@samsung.com>
TC/ecore/ecore_evas_buffer/utc_ecore_evas_buffer_render.c

index 0276075ad027b463fc30d667c46e9b3cd0c0485d..a14520e7109ebc9b8531b5575b114d86f1104951 100644 (file)
@@ -74,14 +74,11 @@ teardown(void)
  * @procedure
  * @step 1 Initialize callback_counter to 0.
  * @step 2 Set post-render event callback for the given Ecore_Evas window.
- * @step 3 Call ecore_evas_show(). Post-render event will be initialized after window showing.
- * @step 4 Set timer for preschedule termination of main loop if tested callback wasn't executed.
- * @step 5 Start of main loop and wait for tested callback executing.
- * @step 6 Check value of static variable named callback_counter. If this variable is more or equal to 1, that callback was executed, and this is well. In other cases we watch error.
- * @step 7 Call ecore_evas_buffer_render(). Post-render event will be initialized after window rendering.
- * @step 8 Set timer for preschedule termination of main loop if tested callback wasn't executed.
- * @step 9 Start of main loop and wait for tested callback executing.
- * @step 10 Check value of static variable named callback_counter. If this variable is more or equal to 1, that callback was executed, and this is well. In other cases we watch error.
+ * @step 3 Call ecore_evas_show().
+ * @step 4 Call ecore_evas_buffer_render(). Post-render event will be initialized after window rendering.
+ * @step 5 Set timer for preschedule termination of main loop if tested callback wasn't executed.
+ * @step 6 Start of main loop and wait for tested callback executing.
+ * @step 7 Check value of static variable named callback_counter. If this variable is more or equal to 1, that callback was executed, and this is well. In other cases we watch error.
  *
  * @passcondition
  * Variable named callback_counter must be more or equal 1, and there is no segmentation fault.
@@ -100,20 +97,6 @@ START_TEST(utc_ecore_evas_buffer_render_p)
 
    ecore_evas_callback_post_render_set(ee, callback_function);
    ecore_evas_show(ee);
-   timer = ecore_timer_add(1.0, _quit_timer_cb, NULL);
-   if (timer == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed (timer cannot be created for testing)..", __FILE__, __LINE__);
-     }
-   ecore_main_loop_begin();
-
-   if (callback_counter < 1)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-
-   callback_counter = 0;
-
    ecore_evas_buffer_render(ee);
    timer = ecore_timer_add(1.0, _quit_timer_cb, NULL);
    if (timer == NULL)