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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2015-05-04 08:42:44 +10:00
parent 6dd02468ac
commit d8ec73aead
3 changed files with 8 additions and 0 deletions

View file

@ -1430,6 +1430,12 @@ litest_timeout_tap(void)
msleep(200);
}
void
litest_timeout_tapndrag(void)
{
msleep(520);
}
void
litest_timeout_softbuttons(void)
{

View file

@ -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);

View file

@ -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);