diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-03 14:57:53 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-03 14:57:53 +1000 |
commit | 5bc4c0b10c6ca97272cdbf1581d1a2403502bc06 (patch) | |
tree | 56998ecdb22bddc662cf36b9b3f9da49a4e4d80f /tests/server | |
parent | 06a95f7d08b4d163f75e429ec5aa79dad294d91e (diff) |
server/barriers: pixmaps are not allowed as drawable for barriers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/barriers-validity.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/server/barriers-validity.cpp b/tests/server/barriers-validity.cpp index b931195..342830b 100644 --- a/tests/server/barriers-validity.cpp +++ b/tests/server/barriers-validity.cpp @@ -48,6 +48,23 @@ TEST_F(BarrierSimpleTest, DestroyInvalidBarrier) ASSERT_ERROR(error, xfixes_error_base + BadBarrier); } +TEST_F(BarrierSimpleTest, PixmapsNotAllowed) +{ + XORG_TESTCASE("Pixmaps are not allowed as drawable.\n" + "Ensure error is generated\n"); + + ::Display *dpy = Display(); + Window root = DefaultRootWindow(dpy); + Pixmap p = XCreatePixmap(dpy, root, 10, 10, DefaultDepth(dpy, DefaultScreen(dpy))); + XSync(dpy, False); + + SetErrorTrap(Display()); + XFixesCreatePointerBarrier(dpy, p, 20, 20, 20, 40, BarrierPositiveX, 0, NULL); + const XErrorEvent *error = ReleaseErrorTrap(Display()); + ASSERT_ERROR(error, BadWindow); + ASSERT_EQ(error->resourceid, p); +} + TEST_F(BarrierSimpleTest, InvalidDeviceCausesBadDevice) { XORG_TESTCASE("Ensure that passing a garbage device ID\n" |