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)
downloadefl-f8dcb7dc2b8dad636989e988d53f81e705a1718c.tar.gz
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
ck_assert_int_eq(*called, 0);
*called = 1;
}
+
+void
+click_object_at(Eo *obj, int x, int y)
+{
+ Evas *e = evas_object_evas_get(obj);
+ evas_event_feed_mouse_move(e, x, y, 0, NULL);
+ evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
+ evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
+}
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);
void get_me_to_those_events(Eo *obj);
void click_object(Eo *obj);
void click_part(Eo *obj, const char *part);
+void click_object_at(Eo *obj, int x, int y);
void 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);
#endif