GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit c0176f62 authored by Povilas Kanapickas's avatar Povilas Kanapickas
Browse files

input: Update test after server fixes for emulated event delivery

parent 4488c0a1
Pipeline #270878 passed with stages
in 1 minute and 28 seconds
......@@ -772,6 +772,7 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
mask.deviceid = XIAllMasterDevices;
mask.mask_len = XIMaskLen(XI_Motion);
mask.mask = new unsigned char[mask.mask_len]();
XISetMask(mask.mask, XI_ButtonPress);
XISetMask(mask.mask, XI_Motion);
XISetMask(mask.mask, XI_DeviceChanged);
XISelectEvents(dpy, DefaultRootWindow(dpy), &mask, 1);
......@@ -784,16 +785,18 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
TouchDev().TouchEnd(120, 120, 0);
ASSERT_EVENT(XIDeviceChangedEvent, dce1, dpy, GenericEvent, xi2_opcode, XI_DeviceChanged);
ASSERT_EVENT(XIDeviceEvent, motion, dpy, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_EVENT(XIDeviceEvent, motion1, dpy, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_EVENT(XIDeviceEvent, press1, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
ASSERT_EVENT(XIDeviceEvent, motion2, dpy, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_GT(motion->valuators.mask_len, 0);
ASSERT_TRUE(XIMaskIsSet(motion->valuators.mask, vscroll_axis));
ASSERT_EVENT(XIDeviceEvent, motion3, dpy, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_GT(motion1->valuators.mask_len, 0);
ASSERT_TRUE(XIMaskIsSet(motion1->valuators.mask, vscroll_axis));
double last_value;
double *valuators = motion->valuators.values;
double *valuators = motion1->valuators.values;
for (int i = 0; i < vscroll_axis; i++) {
if (XIMaskIsSet(motion->valuators.mask, i))
if (XIMaskIsSet(motion1->valuators.mask, i))
valuators++;
}
......@@ -803,7 +806,7 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
MouseDev().RelMotion(1, 0);
ASSERT_EVENT(XIDeviceChangedEvent, dce2, dpy, GenericEvent, xi2_opcode, XI_DeviceChanged);
ASSERT_EVENT(XIDeviceEvent, motion3, dpy, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_EVENT(XIDeviceEvent, motion4, dpy, GenericEvent, xi2_opcode, XI_Motion);
TouchDev().TouchBegin(100, 100, 0, event_valuators);
TouchDev().TouchUpdate(120, 120, 0);
......
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