From d8ec73aead8206b84efdac20d1aa4bd41b89254e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 4 May 2015 08:42:44 +1000 Subject: [PATCH] test: add timeout_tapndrag() Prep work for the upcoming patch to extend the timeout for tap-and-drag. And switch the tests that rely on it over to the new function. Signed-off-by: Peter Hutterer --- test/litest.c | 6 ++++++ test/litest.h | 1 + test/touchpad.c | 1 + 3 files changed, 8 insertions(+) diff --git a/test/litest.c b/test/litest.c index 15fc87ea..91f27473 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1430,6 +1430,12 @@ litest_timeout_tap(void) msleep(200); } +void +litest_timeout_tapndrag(void) +{ + msleep(520); +} + void litest_timeout_softbuttons(void) { diff --git a/test/litest.h b/test/litest.h index 611cdf78..f1a720c8 100644 --- a/test/litest.h +++ b/test/litest.h @@ -196,6 +196,7 @@ struct libevdev_uinput * litest_create_uinput_abs_device(const char *name, ...); void litest_timeout_tap(void); +void litest_timeout_tapndrag(void); void litest_timeout_softbuttons(void); void litest_timeout_buttonscroll(void); void litest_timeout_edgescroll(void); diff --git a/test/touchpad.c b/test/touchpad.c index 114ae2c7..576b2bd8 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -574,6 +574,7 @@ START_TEST(touchpad_1fg_tap_n_drag_timeout) litest_assert_empty_queue(li); litest_touch_up(dev, 0); + litest_timeout_tapndrag(); litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);