Commit f9b1875a authored by Peter Hutterer's avatar Peter Hutterer

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent b9b4065c
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment