summaryrefslogtreecommitdiff
path: root/test/test-touchpad.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-08-27 15:19:58 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-08-27 17:21:45 +1000
commitf9b1875ab4e4f55798932a558bf3aeec347def7b (patch)
tree2ee1023bf689cc059253f7cce2aa289fd472564e /test/test-touchpad.c
parentb9b4065cda2dab2008d69ea758190d91d236b04e (diff)
downloadlibinput-f9b1875ab4e4f55798932a558bf3aeec347def7b.tar.gz
test: fix a DWT test, only worked because of timing success
This test only succeeded because all events were sent within the dwt timeout. Change it to actually test the behavior of a touch being disabled by DWT and staying disabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-touchpad.c')
-rw-r--r--test/test-touchpad.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test-touchpad.c b/test/test-touchpad.c
index 6cf049dc..c3c66507 100644
--- a/test/test-touchpad.c
+++ b/test/test-touchpad.c
@@ -4255,12 +4255,19 @@ START_TEST(touchpad_dwt_disable_during_touch)
litest_keyboard_key(keyboard, KEY_A, true);
litest_keyboard_key(keyboard, KEY_A, false);
- litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
litest_touch_down(touchpad, 0, 50, 50);
+
+ litest_keyboard_key(keyboard, KEY_A, true);
+ litest_keyboard_key(keyboard, KEY_A, false);
+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
+
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1);
litest_assert_empty_queue(li);
+ litest_timeout_dwt_long();
+ libinput_dispatch(li);
+
disable_dwt(touchpad);
/* touch already down -> keeps being ignored */