summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-02 10:23:31 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-03 10:54:42 +0100
commit677b507281103ccd1d761641fc81338abef6b364 (patch)
treec91240c207ba2540a1e56cb61341cc51a4c7c322
parent710c05ed5ae8d470c9efd2f15b059144672fc6ab (diff)
tests/gesture: add test for gesture sequence
ensure that tap continues working after complex gestures Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11440
-rw-r--r--src/tests/elementary/efl_ui_test_gesture.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_gesture.c b/src/tests/elementary/efl_ui_test_gesture.c
index fccbdd62fb..0805cd82ee 100644
--- a/src/tests/elementary/efl_ui_test_gesture.c
+++ b/src/tests/elementary/efl_ui_test_gesture.c
@@ -717,6 +717,46 @@ EFL_START_TEST(test_efl_ui_gesture_custom)
717} 717}
718EFL_END_TEST 718EFL_END_TEST
719 719
720
721EFL_START_TEST(test_efl_ui_gesture_sequence)
722{
723 Eo *rect = setup();
724 int moves;
725
726 multi_click_object(rect, 1);
727 CHECK_ALL(TAP, 1, 0, 1, 0);
728
729 wait_timer(0.4);
730 RESET;
731
732 moves = pinch_object(rect, 500, 500, 501, 501, -250, 0, 250, 0);
733 /* canceled */
734 CHECK_ALL(TAP, 1, 0, 0, 1);
735 /* canceled */
736 CHECK_ALL(LONG_PRESS, 1, 0, 0, 1);
737 /* canceled */
738 CHECK_ALL(DOUBLE_TAP, 1, 0, 0, 1);
739 /* canceled */
740 CHECK_ALL(TRIPLE_TAP, 1, 0, 0, 1);
741
742
743 CHECK_START(ZOOM, 1);
744 /* 2 touch points tracked, so this will be roughly (2 * moves) but probably less */
745 ck_assert_int_ge(count[ZOOM][EFL_GESTURE_STATE_UPDATED - 1], moves);
746 /* finished 1x */
747 CHECK_FINISH(ZOOM, 1);
748 CHECK_CANCEL(ZOOM, 0);
749
750 wait_timer(0.4);
751 RESET;
752
753 multi_click_object(rect, 1);
754 CHECK_ALL(TAP, 1, 0, 1, 0);
755
756 RESET;
757}
758EFL_END_TEST
759
720void efl_ui_test_gesture(TCase *tc) 760void efl_ui_test_gesture(TCase *tc)
721{ 761{
722 tcase_add_test(tc, test_efl_ui_gesture_taps); 762 tcase_add_test(tc, test_efl_ui_gesture_taps);
@@ -725,4 +765,5 @@ void efl_ui_test_gesture(TCase *tc)
725 tcase_add_test(tc, test_efl_ui_gesture_zoom); 765 tcase_add_test(tc, test_efl_ui_gesture_zoom);
726 tcase_add_test(tc, test_efl_ui_gesture_rotate); 766 tcase_add_test(tc, test_efl_ui_gesture_rotate);
727 tcase_add_test(tc, test_efl_ui_gesture_custom); 767 tcase_add_test(tc, test_efl_ui_gesture_custom);
768 tcase_add_test(tc, test_efl_ui_gesture_sequence);
728} 769}