summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-05 13:53:03 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-06 09:26:37 +0200
commitf8dcb7dc2b8dad636989e988d53f81e705a1718c (patch)
treec99856f69c1108e5b6166fe2fc6c5a8b3832446a
parent067d65361e3b2c6d992b59fddb373569839ddc60 (diff)
tests/elm: add helper function for clicking at specified coords
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9505
-rw-r--r--src/tests/elementary/suite_helpers.c9
-rw-r--r--src/tests/elementary/suite_helpers.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c
index e4d7e1b45f..ff5530a93f 100644
--- a/src/tests/elementary/suite_helpers.c
+++ b/src/tests/elementary/suite_helpers.c
@@ -465,3 +465,12 @@ event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointe
465 ck_assert_int_eq(*called, 0); 465 ck_assert_int_eq(*called, 0);
466 *called = 1; 466 *called = 1;
467} 467}
468
469void
470click_object_at(Eo *obj, int x, int y)
471{
472 Evas *e = evas_object_evas_get(obj);
473 evas_event_feed_mouse_move(e, x, y, 0, NULL);
474 evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
475 evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
476}
diff --git a/src/tests/elementary/suite_helpers.h b/src/tests/elementary/suite_helpers.h
index f1e01d70db..0dc3944173 100644
--- a/src/tests/elementary/suite_helpers.h
+++ b/src/tests/elementary/suite_helpers.h
@@ -13,5 +13,6 @@ void fail_on_errors_setup(void);
13void get_me_to_those_events(Eo *obj); 13void get_me_to_those_events(Eo *obj);
14void click_object(Eo *obj); 14void click_object(Eo *obj);
15void click_part(Eo *obj, const char *part); 15void click_part(Eo *obj, const char *part);
16void click_object_at(Eo *obj, int x, int y);
16void event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); 17void event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
17#endif 18#endif