test: fix pad_button_ignored test to not trigger the proximity timeout

Once we start working with real event frames (i.e. intervals after SYN_REPORT)
we'll always trigger the proximity timeout here. Avoid this by sending one
event with all buttons.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-08-27 16:31:12 +10:00
parent 3b97de9a43
commit 74f4491f17

View file

@ -2226,13 +2226,17 @@ START_TEST(pad_buttons_ignored)
litest_tablet_proximity_in(dev, 10, 10, axes);
litest_drain_events(li);
for (button = BTN_0; button < BTN_MOUSE; button++) {
for (button = BTN_0; button < BTN_MOUSE; button++)
litest_event(dev, EV_KEY, button, 1);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
for (button = BTN_0; button < BTN_MOUSE; button++)
litest_event(dev, EV_KEY, button, 0);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
}
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
litest_assert_empty_queue(li);
}