diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2013-05-17 16:46:06 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-17 16:21:59 -0400 |
commit | 5e9bedb8c4327a2b304837cbc5433256b3207175 (patch) | |
tree | 70affdaef891c449aa2b8b741e35bb0a5f0c3867 /tests | |
parent | 16abf6a4d42b9b9b4ab9fe3b537aa8914e989274 (diff) |
tests: add a sub-surface nesting loop test
It should not be possible to create a loop by nesting sub-surfaces.
Currently Weston fails this test.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/subsurface-test.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/subsurface-test.c b/tests/subsurface-test.c index 0a210fb6..98e00fea 100644 --- a/tests/subsurface-test.c +++ b/tests/subsurface-test.c @@ -220,6 +220,28 @@ TEST(test_subsurface_nesting_parent) client_roundtrip(client); } +FAIL_TEST(test_subsurface_loop_paradox) +{ + struct client *client; + struct wl_surface *surface[3]; + struct wl_subcompositor *subco; + + client = client_create(100, 50, 123, 77); + assert(client); + + subco = get_subcompositor(client); + surface[0] = wl_compositor_create_surface(client->wl_compositor); + surface[1] = wl_compositor_create_surface(client->wl_compositor); + surface[2] = wl_compositor_create_surface(client->wl_compositor); + + /* create a nesting loop */ + wl_subcompositor_get_subsurface(subco, surface[1], surface[0]); + wl_subcompositor_get_subsurface(subco, surface[2], surface[1]); + wl_subcompositor_get_subsurface(subco, surface[0], surface[2]); + + client_roundtrip(client); +} + FAIL_TEST(test_subsurface_place_above_stranger) { struct client *client; |