summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-12-12 14:44:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-13 15:12:44 +1000
commitd768e2db90a06c99b28ef079c3c7f2b78b6c4528 (patch)
tree68bcf122af5eb46f0433d2540e8973a53e6c670b
parent99001556c3e666492fba11b3233fe4909f05d33d (diff)
server/barrier: check we don't get stray events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/server/barriers-notify.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/server/barriers-notify.cpp b/tests/server/barriers-notify.cpp
index bf99b27..a77efc2 100644
--- a/tests/server/barriers-notify.cpp
+++ b/tests/server/barriers-notify.cpp
@@ -292,6 +292,8 @@ TEST_P(BarrierNotify, BarrierReleases)
}
XFixesDestroyPointerBarrier(dpy, barrier);
+
+ ASSERT_TRUE(NoEventPending(dpy));
}
TEST_P(BarrierNotify, DestroyWindow)
@@ -344,6 +346,7 @@ TEST_P(BarrierNotify, DestroyWindow)
XI_BarrierHit,
500));
+ ASSERT_TRUE(NoEventPending(dpy));
XFixesDestroyPointerBarrier(dpy, barrier);
}
@@ -856,6 +859,8 @@ TEST_P(BarrierNotify, ReceivesLeaveOnDestroyWhenInsideHitbox)
ASSERT_EQ(event.ev->deviceid, deviceid);
ASSERT_EQ(event.ev->sourceid, 0);
}
+
+ ASSERT_TRUE(NoEventPending(dpy));
}
TEST_P(BarrierNotify, DoesntReceiveLeaveOnDestroyWhenOutsideHitbox)
@@ -884,6 +889,8 @@ TEST_P(BarrierNotify, DoesntReceiveLeaveOnDestroyWhenOutsideHitbox)
XIWarpPointer(dpy, deviceid, None, root, 0, 0, 0, 0, 30, 30);
XFixesDestroyPointerBarrier(dpy, barrier);
ASSERT_FALSE(xorg::testing::XServer::WaitForEvent(dpy, 500));
+
+ ASSERT_TRUE(NoEventPending(dpy));
}
INSTANTIATE_TEST_CASE_P(, BarrierNotify, ::testing::Values(NO_DEVICE_SPECIFICS,