aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-12-20 11:30:58 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-02 13:39:12 -0800
commite9a434df9b2609f67546e0c99444d7ab17e715da (patch)
tree5e5a775d0dd8d3a354c08efea1c4aa747f07d8b1
parenteo: correctly allow for triggering the same event while the previous one was ... (diff)
downloadefl-e9a434df9b2609f67546e0c99444d7ab17e715da.tar.gz
eo: test that event cancel before emitting does propagate event.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7496
-rw-r--r--src/tests/eo/signals/signals_main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index 3639ff132d..58b9eda958 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -58,6 +58,22 @@ _restart_2_cb(void *data, const Efl_Event *event)
efl_event_callback_stop(event->object);
}
+static void
+_restart_3_cb(void *data, const Efl_Event *event)
+{
+ fprintf(stderr, "restart 3 inside: %i\n", inside);
+ fail_if(!inside);
+
+ fprintf(stderr, "restart 3 exit inside: %i (%i)\n", inside, called);
+ efl_event_callback_stop(event->object);
+
+ inside = EINA_TRUE;
+ efl_event_callback_call(event->object, event->desc, data);
+ inside = EINA_FALSE;
+
+ called++;
+}
+
int
main(int argc, char *argv[])
{
@@ -198,10 +214,11 @@ main(int argc, char *argv[])
fail_if(fcount != 0);
efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL);
+ efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_BEFORE, _restart_3_cb, NULL);
efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_BEFORE, _restart_2_cb, NULL);
efl_event_callback_legacy_call(obj, EV_RESTART, NULL);
fail_if(inside);
- fail_if(called != 2);
+ fail_if(called != 3);
efl_unref(obj);
efl_object_shutdown();