Commit 8cf6893f authored by Peter Hutterer's avatar Peter Hutterer

test: replace litest_button_click with a debounced version

This is via a simple search & replace. Later auditing is needed to switch
clicks that should not be debounced (e.g. touchpads) back to a non-debounced
version.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent eb048529
......@@ -2018,7 +2018,10 @@ litest_hover_move_two_touches(struct litest_device *d,
}
void
litest_button_click(struct litest_device *d, unsigned int button, bool is_press)
litest_button_click_debounced(struct litest_device *d,
struct libinput *li,
unsigned int button,
bool is_press)
{
struct input_event *ev;
......@@ -2029,7 +2032,9 @@ litest_button_click(struct litest_device *d, unsigned int button, bool is_press)
ARRAY_FOR_EACH(click, ev)
litest_event(d, ev->type, ev->code, ev->value);
libinput_dispatch(li);
litest_timeout_debounce();
libinput_dispatch(li);
}
void
......@@ -2039,7 +2044,7 @@ litest_button_scroll(struct litest_device *dev,
{
struct libinput *li = dev->libinput;
litest_button_click(dev, button, 1);
litest_button_click_debounced(dev, li, button, 1);
libinput_dispatch(li);
litest_timeout_buttonscroll();
......@@ -2049,7 +2054,7 @@ litest_button_scroll(struct litest_device *dev,
litest_event(dev, EV_REL, REL_Y, dy);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_button_click(dev, button, 0);
litest_button_click_debounced(dev, li, button, 0);
libinput_dispatch(li);
}
......@@ -2057,7 +2062,14 @@ litest_button_scroll(struct litest_device *dev,
void
litest_keyboard_key(struct litest_device *d, unsigned int key, bool is_press)
{
litest_button_click(d, key, is_press);
struct input_event *ev;
struct input_event click[] = {
{ .type = EV_KEY, .code = key, .value = is_press ? 1 : 0 },
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
};
ARRAY_FOR_EACH(click, ev)
litest_event(d, ev->type, ev->code, ev->value);
}
void
......
......@@ -597,9 +597,10 @@ litest_hover_move_two_touches(struct litest_device *d,
int steps, int sleep_ms);
void
litest_button_click(struct litest_device *d,
unsigned int button,
bool is_press);
litest_button_click_debounced(struct litest_device *d,
struct libinput *li,
unsigned int button,
bool is_press);
void
litest_button_scroll(struct litest_device *d,
......
......@@ -463,7 +463,7 @@ START_TEST(device_disable_release_buttons)
device = dev->libinput_device;
litest_button_click(dev, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_drain_events(li);
status = libinput_device_config_send_events_set_mode(device,
......@@ -497,7 +497,7 @@ START_TEST(device_disable_release_keys)
device = dev->libinput_device;
litest_button_click(dev, KEY_A, true);
litest_button_click_debounced(dev, li, KEY_A, true);
litest_drain_events(li);
status = libinput_device_config_send_events_set_mode(device,
......@@ -616,7 +616,7 @@ START_TEST(device_disable_release_softbutton)
litest_drain_events(li);
litest_touch_down(dev, 0, 90, 90);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
/* make sure softbutton works */
litest_assert_button_event(li,
......@@ -633,7 +633,7 @@ START_TEST(device_disable_release_softbutton)
litest_assert_empty_queue(li);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
litest_touch_up(dev, 0);
litest_assert_empty_queue(li);
......@@ -669,8 +669,8 @@ START_TEST(device_disable_topsoftbutton)
litest_drain_events(li);
litest_touch_down(dev, 0, 90, 10);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
litest_touch_up(dev, 0);
litest_wait_for_event(li);
......
......@@ -416,8 +416,8 @@ START_TEST(event_conversion_tablet)
litest_tablet_proximity_in(dev, 50, 50, axes);
litest_tablet_motion(dev, 60, 50, axes);
litest_button_click(dev, BTN_STYLUS, true);
litest_button_click(dev, BTN_STYLUS, false);
litest_button_click_debounced(dev, li, BTN_STYLUS, true);
litest_button_click_debounced(dev, li, BTN_STYLUS, false);
libinput_dispatch(li);
......@@ -458,7 +458,7 @@ START_TEST(event_conversion_tablet_pad)
struct libinput_event *event;
int events = 0;
litest_button_click(dev, BTN_0, true);
litest_button_click_debounced(dev, li, BTN_0, true);
litest_pad_ring_start(dev, 10);
litest_pad_ring_end(dev);
......
......@@ -68,8 +68,8 @@ START_TEST(pad_time)
if (!libevdev_has_event_code(dev->evdev, EV_KEY, code))
continue;
litest_button_click(dev, code, 1);
litest_button_click(dev, code, 0);
litest_button_click_debounced(dev, li, code, 1);
litest_button_click_debounced(dev, li, code, 0);
libinput_dispatch(li);
switch (code) {
......@@ -98,8 +98,8 @@ START_TEST(pad_time)
litest_drain_events(li);
msleep(10);
litest_button_click(dev, code, 1);
litest_button_click(dev, code, 0);
litest_button_click_debounced(dev, li, code, 1);
litest_button_click_debounced(dev, li, code, 0);
libinput_dispatch(li);
ev = libinput_get_event(li);
......@@ -156,8 +156,8 @@ START_TEST(pad_button)
if (!libevdev_has_event_code(dev->evdev, EV_KEY, code))
continue;
litest_button_click(dev, code, 1);
litest_button_click(dev, code, 0);
litest_button_click_debounced(dev, li, code, 1);
litest_button_click_debounced(dev, li, code, 0);
libinput_dispatch(li);
switch (code) {
......@@ -207,8 +207,8 @@ START_TEST(pad_button_mode_groups)
if (!libevdev_has_event_code(dev->evdev, EV_KEY, code))
continue;
litest_button_click(dev, code, 1);
litest_button_click(dev, code, 0);
litest_button_click_debounced(dev, li, code, 1);
litest_button_click_debounced(dev, li, code, 0);
libinput_dispatch(li);
switch (code) {
......
......@@ -348,7 +348,7 @@ test_button_event(struct litest_device *dev, unsigned int button, int state)
{
struct libinput *li = dev->libinput;
litest_button_click(dev, button, state);
litest_button_click_debounced(dev, li, button, state);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_assert_button_event(li, button,
......@@ -500,7 +500,7 @@ START_TEST(pointer_recover_from_lost_button_count)
litest_drain_events(dev->libinput);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
litest_assert_button_event(li,
BTN_LEFT,
......@@ -508,15 +508,15 @@ START_TEST(pointer_recover_from_lost_button_count)
/* Grab for the release to make libinput lose count */
libevdev_grab(evdev, LIBEVDEV_GRAB);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
libevdev_grab(evdev, LIBEVDEV_UNGRAB);
litest_assert_empty_queue(li);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
litest_assert_empty_queue(li);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
litest_assert_button_event(li,
BTN_LEFT,
LIBINPUT_BUTTON_STATE_RELEASED);
......@@ -802,7 +802,10 @@ START_TEST(pointer_seat_button_count)
}
for (i = 0; i < num_devices; ++i)
litest_button_click(devices[i], BTN_LEFT, true);
litest_button_click_debounced(devices[i],
libinput,
BTN_LEFT,
true);
libinput_dispatch(libinput);
while ((ev = libinput_get_event(libinput))) {
......@@ -832,7 +835,10 @@ START_TEST(pointer_seat_button_count)
ck_assert_int_eq(seat_button_count, num_devices);
for (i = 0; i < num_devices; ++i)
litest_button_click(devices[i], BTN_LEFT, false);
litest_button_click_debounced(devices[i],
libinput,
BTN_LEFT,
false);
libinput_dispatch(libinput);
while ((ev = libinput_get_event(libinput))) {
......@@ -921,8 +927,8 @@ START_TEST(pointer_left_handed)
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
litest_drain_events(li);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
litest_assert_button_event(li,
BTN_RIGHT,
......@@ -931,8 +937,8 @@ START_TEST(pointer_left_handed)
BTN_RIGHT,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_button_click(dev, BTN_RIGHT, 1);
litest_button_click(dev, BTN_RIGHT, 0);
litest_button_click_debounced(dev, li, BTN_RIGHT, 1);
litest_button_click_debounced(dev, li, BTN_RIGHT, 0);
litest_assert_button_event(li,
BTN_LEFT,
LIBINPUT_BUTTON_STATE_PRESSED);
......@@ -941,8 +947,8 @@ START_TEST(pointer_left_handed)
LIBINPUT_BUTTON_STATE_RELEASED);
if (libinput_device_pointer_has_button(d, BTN_MIDDLE)) {
litest_button_click(dev, BTN_MIDDLE, 1);
litest_button_click(dev, BTN_MIDDLE, 0);
litest_button_click_debounced(dev, li, BTN_MIDDLE, 1);
litest_button_click_debounced(dev, li, BTN_MIDDLE, 0);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
......@@ -961,14 +967,14 @@ START_TEST(pointer_left_handed_during_click)
enum libinput_config_status status;
litest_drain_events(li);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
libinput_dispatch(li);
/* Change while button is down, expect correct release event */
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
litest_assert_button_event(li,
BTN_LEFT,
......@@ -992,16 +998,16 @@ START_TEST(pointer_left_handed_during_click_multiple_buttons)
litest_disable_middleemu(dev);
litest_drain_events(li);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
libinput_dispatch(li);
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
/* No left-handed until all buttons were down */
litest_button_click(dev, BTN_RIGHT, 1);
litest_button_click(dev, BTN_RIGHT, 0);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_RIGHT, 1);
litest_button_click_debounced(dev, li, BTN_RIGHT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
litest_assert_button_event(li,
BTN_LEFT,
......@@ -1102,7 +1108,7 @@ START_TEST(pointer_scroll_button_no_event_before_timeout)
BTN_LEFT);
litest_drain_events(li);
litest_button_click(device, BTN_LEFT, true);
litest_button_click_debounced(device, li, BTN_LEFT, true);
litest_assert_empty_queue(li);
for (i = 0; i < 10; i++) {
......@@ -1113,7 +1119,7 @@ START_TEST(pointer_scroll_button_no_event_before_timeout)
litest_timeout_buttonscroll();
libinput_dispatch(li);
litest_button_click(device, BTN_LEFT, false);
litest_button_click_debounced(device, li, BTN_LEFT, false);
litest_assert_button_event(li, BTN_LEFT,
LIBINPUT_BUTTON_STATE_PRESSED);
......@@ -1146,8 +1152,8 @@ START_TEST(pointer_scroll_button_middle_emulation)
litest_drain_events(li);
litest_button_click(dev, BTN_LEFT, 1);
litest_button_click(dev, BTN_RIGHT, 1);
litest_button_click_debounced(dev, li, BTN_LEFT, 1);
litest_button_click_debounced(dev, li, BTN_RIGHT, 1);
libinput_dispatch(li);
litest_timeout_buttonscroll();
libinput_dispatch(li);
......@@ -1159,8 +1165,8 @@ START_TEST(pointer_scroll_button_middle_emulation)
libinput_dispatch(li);
litest_button_click(dev, BTN_LEFT, 0);
litest_button_click(dev, BTN_RIGHT, 0);
litest_button_click_debounced(dev, li, BTN_LEFT, 0);
litest_button_click_debounced(dev, li, BTN_RIGHT, 0);
libinput_dispatch(li);
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -1);
......@@ -1525,16 +1531,16 @@ START_TEST(middlebutton)
litest_drain_events(li);
for (i = 0; i < ARRAY_LENGTH(btn); i++) {
litest_button_click(device, btn[i][0], true);
litest_button_click(device, btn[i][1], true);
litest_button_click_debounced(device, li, btn[i][0], true);
litest_button_click_debounced(device, li, btn[i][1], true);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(device, btn[i][2], false);
litest_button_click(device, btn[i][3], false);
litest_button_click_debounced(device, li, btn[i][2], false);
litest_button_click_debounced(device, li, btn[i][3], false);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
......@@ -1568,33 +1574,33 @@ START_TEST(middlebutton_nostart_while_down)
if (status == LIBINPUT_CONFIG_STATUS_UNSUPPORTED)
return;
litest_button_click(device, BTN_MIDDLE, true);
litest_button_click_debounced(device, li, BTN_MIDDLE, true);
litest_drain_events(li);
for (i = 0; i < ARRAY_LENGTH(btn); i++) {
litest_button_click(device, btn[i][0], true);
litest_button_click_debounced(device, li, btn[i][0], true);
litest_assert_button_event(li,
btn[i][0],
LIBINPUT_BUTTON_STATE_PRESSED);
litest_button_click(device, btn[i][1], true);
litest_button_click_debounced(device, li, btn[i][1], true);
litest_assert_button_event(li,
btn[i][1],
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(device, btn[i][2], false);
litest_button_click_debounced(device, li, btn[i][2], false);
litest_assert_button_event(li,
btn[i][2],
LIBINPUT_BUTTON_STATE_RELEASED);
litest_button_click(device, btn[i][3], false);
litest_button_click_debounced(device, li, btn[i][3], false);
litest_assert_button_event(li,
btn[i][3],
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_empty_queue(li);
}
litest_button_click(device, BTN_MIDDLE, false);
litest_button_click_debounced(device, li, BTN_MIDDLE, false);
litest_drain_events(li);
}
END_TEST
......@@ -1616,7 +1622,7 @@ START_TEST(middlebutton_timeout)
for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
litest_drain_events(li);
litest_button_click(device, button, true);
litest_button_click_debounced(device, li, button, true);
litest_assert_empty_queue(li);
litest_timeout_middlebutton();
......@@ -1624,7 +1630,7 @@ START_TEST(middlebutton_timeout)
button,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_button_click(device, button, false);
litest_button_click_debounced(device, li, button, false);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_RELEASED);
......@@ -1657,22 +1663,22 @@ START_TEST(middlebutton_doubleclick)
litest_drain_events(li);
for (i = 0; i < ARRAY_LENGTH(btn); i++) {
litest_button_click(device, btn[i][0], true);
litest_button_click(device, btn[i][1], true);
litest_button_click_debounced(device, li, btn[i][0], true);
litest_button_click_debounced(device, li, btn[i][1], true);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(device, btn[i][2], false);
litest_button_click(device, btn[i][2], true);
litest_button_click_debounced(device, li, btn[i][2], false);
litest_button_click_debounced(device, li, btn[i][2], true);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_button_click(device, btn[i][3], false);
litest_button_click_debounced(device, li, btn[i][3], false);
litest_assert_button_event(li,
BTN_MIDDLE,
......@@ -1705,8 +1711,8 @@ START_TEST(middlebutton_middleclick)
for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
/* release button before middle */
litest_drain_events(li);
litest_button_click(device, button, true);
litest_button_click(device, BTN_MIDDLE, true);
litest_button_click_debounced(device, li, button, true);
litest_button_click_debounced(device, li, BTN_MIDDLE, true);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_PRESSED);
......@@ -1714,19 +1720,19 @@ START_TEST(middlebutton_middleclick)
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(device, button, false);
litest_button_click_debounced(device, li, button, false);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_button_click(device, BTN_MIDDLE, false);
litest_button_click_debounced(device, li, BTN_MIDDLE, false);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_empty_queue(li);
/* release middle before button */
litest_button_click(device, button, true);
litest_button_click(device, BTN_MIDDLE, true);
litest_button_click_debounced(device, li, button, true);
litest_button_click_debounced(device, li, BTN_MIDDLE, true);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_PRESSED);
......@@ -1734,11 +1740,11 @@ START_TEST(middlebutton_middleclick)
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(device, BTN_MIDDLE, false);
litest_button_click_debounced(device, li, BTN_MIDDLE, false);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_button_click(device, button, false);
litest_button_click_debounced(device, li, button, false);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_RELEASED);
......@@ -1770,14 +1776,14 @@ START_TEST(middlebutton_middleclick_during)
/* trigger emulation, then real middle */
for (button = BTN_LEFT; button <= BTN_RIGHT; button++) {
litest_button_click(device, BTN_LEFT, true);
litest_button_click(device, BTN_RIGHT, true);
litest_button_click_debounced(device, li, BTN_LEFT, true);
litest_button_click_debounced(device, li, BTN_RIGHT, true);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_button_click(device, BTN_MIDDLE, true);
litest_button_click_debounced(device, li, BTN_MIDDLE, true);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
......@@ -1788,23 +1794,23 @@ START_TEST(middlebutton_middleclick_during)
litest_assert_empty_queue(li);
/* middle still down, release left/right */
litest_button_click(device, button, false);
litest_button_click_debounced(device, li, button, false);
litest_assert_empty_queue(li);
litest_button_click(device, button, true);
litest_button_click_debounced(device, li, button, true);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
/* release both */
litest_button_click(device, BTN_LEFT, false);
litest_button_click(device, BTN_RIGHT, false);
litest_button_click_debounced(device, li, BTN_LEFT, false);
litest_button_click_debounced(device, li, BTN_RIGHT, false);
litest_assert_button_event(li,
button,
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_empty_queue(li);
litest_button_click(device, BTN_MIDDLE, false);
litest_button_click_debounced(device, li, BTN_MIDDLE, false);
litest_assert_button_event(li,
BTN_MIDDLE,
LIBINPUT_BUTTON_STATE_RELEASED);
......
......@@ -1041,7 +1041,7 @@ START_TEST(clickpad_finger_pin)
litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1);
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_drain_events(li);
litest_touch_move_to(dev, 0, 50, 50, 50 + dist, 50 + dist, 10, 1);
......@@ -1050,7 +1050,7 @@ START_TEST(clickpad_finger_pin)
litest_assert_empty_queue(li);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
/* still pinned after release */
......@@ -1490,7 +1490,7 @@ START_TEST(clickpad_softbutton_hover_into_buttons)
litest_touch_move_to(dev, 0, 90, 90, 91, 91, 1, 0);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
libinput_dispatch(li);
litest_assert_button_event(li,
......@@ -1498,7 +1498,7 @@ START_TEST(clickpad_softbutton_hover_into_buttons)
LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_empty_queue(li);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
litest_touch_up(dev, 0);
litest_assert_button_event(li,
......
......@@ -332,8 +332,8 @@ START_TEST(touchpad_1fg_multitap_n_drag_click)
litest_touch_down(dev, 0, 50, 50);
libinput_dispatch(li);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
libinput_dispatch(li);
for (ntaps = 0; ntaps <= range; ntaps++) {
......@@ -627,8 +627,8 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click)
litest_touch_up(dev, 0);
litest_touch_down(dev, 0, 70, 50);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
libinput_dispatch(li);
litest_assert_button_event(li,
......@@ -799,8 +799,8 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap_click)
litest_touch_up(dev, 0);
litest_touch_down(dev, 0, 50, 50);
litest_button_click(dev, BTN_LEFT, true);
litest_button_click(dev, BTN_LEFT, false);
litest_button_click_debounced(dev, li, BTN_LEFT, true);
litest_button_click_debounced(dev, li, BTN_LEFT, false);
libinput_dispatch(li);
litest_assert_button_event(li, BTN_LEFT,
......
......@@ -842,7 +842,7 @@ START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll)
litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5);
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS);