diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2020-01-13 15:10:40 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2020-01-23 15:25:01 -0500 |
commit | 41b437375520bf2a7f1e88c1ad6f8b309b7e3049 (patch) | |
tree | a1a156f3424a88da9fc61b6840a742ed7ec56eb2 | |
parent | 50379c00ffb8404e3c2460a03e1d287f3b040df7 (diff) | |
download | efl-41b437375520bf2a7f1e88c1ad6f8b309b7e3049.tar.gz |
tests/gesture: add gesture tests for basic multi-touch tap events
Differential Revision: https://phab.enlightenment.org/D11090
-rw-r--r-- | src/tests/elementary/efl_ui_test_gesture.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_gesture.c b/src/tests/elementary/efl_ui_test_gesture.c index c0d48581b0..b6c251aaa5 100644 --- a/src/tests/elementary/efl_ui_test_gesture.c +++ b/src/tests/elementary/efl_ui_test_gesture.c @@ -126,6 +126,51 @@ EFL_START_TEST(test_efl_ui_gesture_taps) CHECK_ZERO(MOMENTUM); CHECK_ZERO(FLICK); CHECK_ZERO(ZOOM); + + /* clear states */ + wait_timer(0.4); + RESET; + + /* verify multiple simultaneous presses treated as same press */ + multi_click_object(rect, 2); + CHECK_ALL(TAP, 1, 0, 1, 0); + CHECK_ALL(LONG_TAP, 1, 0, 0, 1); + CHECK_ALL(DOUBLE_TAP, 1, 1, 0, 0); + CHECK_ALL(TRIPLE_TAP, 1, 1, 0, 0); + CHECK_ZERO(MOMENTUM); + CHECK_ZERO(FLICK); + /* this is two fingers, so we have a zoom start */ + CHECK_ALL(ZOOM, 1, 0, 0, 1); + + RESET; + + multi_click_object(rect, 2); + CHECK_ALL(TAP, 1, 0, 1, 0); + CHECK_ALL(LONG_TAP, 1, 0, 0, 1); + /* UPDATE -> FINISH */ + CHECK_ALL(DOUBLE_TAP, 0, 1, 1, 0); + CHECK_ALL(TRIPLE_TAP, 0, 2, 0, 0); + CHECK_ZERO(MOMENTUM); + CHECK_ZERO(FLICK); + /* this is two fingers, so we have a zoom start */ + CHECK_ALL(ZOOM, 1, 0, 0, 1); + + RESET; + + multi_click_object(rect, 2); + CHECK_ALL(TAP, 1, 0, 1, 0); + CHECK_ALL(LONG_TAP, 1, 0, 0, 1); + /* UPDATE -> FINISH */ + CHECK_ALL(DOUBLE_TAP, 1, 1, 0, 0); + CHECK_ALL(TRIPLE_TAP, 0, 1, 1, 0); + CHECK_ZERO(MOMENTUM); + CHECK_ZERO(FLICK); + /* this is two fingers, so we have a zoom start */ + CHECK_ALL(ZOOM, 1, 0, 0, 1); + /* clear states */ + wait_timer(0.4); + RESET; + } EFL_END_TEST |