summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-06-27 06:52:39 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-06-27 06:52:39 +1000
commit3fe1e07a15bc006171a6808a561749878c917c1a (patch)
tree15cc51e8d98f8947fbdaf5c8d2dbbd7ec7e4c780
parentfcf7891f3051a4d034ef9c1767a7b0bd18f27d7a (diff)
evdev: add test for disallowing a 0 wheel inertia
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/input/evdev.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/input/evdev.cpp b/tests/input/evdev.cpp
index b9d242c..99e8a19 100644
--- a/tests/input/evdev.cpp
+++ b/tests/input/evdev.cpp
@@ -364,6 +364,25 @@ TEST_F(EvdevMouseTest, BtnReleaseMaskOnly)
ASSERT_FALSE(XPending(Display()));
}
+TEST_F(EvdevMouseTest, WheelEmulationZeroIsBadValue)
+{
+ XORG_TESTCASE("Set wheel emulation intertia to 0\n"
+ "Expect BadValue\n"
+ "https://bugs.freedesktop.org/show_bug.cgi?id=66125");
+
+ ::Display *dpy = Display();
+ int deviceid;
+ ASSERT_TRUE(FindInputDeviceByName(Display(), "--device--", &deviceid));
+
+
+ ASSERT_PROPERTY(short, emulation, dpy, deviceid, "Evdev Wheel Emulation Inertia");
+ emulation.data[0] = 0;
+
+ SetErrorTrap(dpy);
+ emulation.Update();
+ ASSERT_ERROR(ReleaseErrorTrap(dpy), BadValue);
+}
+
#ifdef HAVE_XI22
TEST_F(EvdevMouseTest, SmoothScrollingAvailable)
{