mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 16:58:04 +02:00
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>
This commit is contained in:
parent
b9b4065cda
commit
f9b1875ab4
1 changed files with 8 additions and 1 deletions
|
|
@ -4255,12 +4255,19 @@ START_TEST(touchpad_dwt_disable_during_touch)
|
||||||
|
|
||||||
litest_keyboard_key(keyboard, KEY_A, true);
|
litest_keyboard_key(keyboard, KEY_A, true);
|
||||||
litest_keyboard_key(keyboard, KEY_A, false);
|
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_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_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1);
|
||||||
litest_assert_empty_queue(li);
|
litest_assert_empty_queue(li);
|
||||||
|
|
||||||
|
litest_timeout_dwt_long();
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
disable_dwt(touchpad);
|
disable_dwt(touchpad);
|
||||||
|
|
||||||
/* touch already down -> keeps being ignored */
|
/* touch already down -> keeps being ignored */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue