tests: Add "closed-transient" test

When a transient window is destroyed, the expected behavior is that
focus is passed to the ancestor if possible. This was broken for
quite a while until the previous commit, so add a test case to make
sure it doesn't happen again.

https://gitlab.gnome.org/GNOME/mutter/issues/15
This commit is contained in:
Florian Müllner 2018-07-19 11:47:12 +02:00 committed by Jonas Ådahl
parent d99442d6e6
commit e283cd7b91
2 changed files with 20 additions and 0 deletions

View File

@ -14,6 +14,7 @@ stackingdir = $(pkgdatadir)/tests/stacking
dist_stacking_DATA = \
$(srcdir)/tests/stacking/basic-x11.metatest \
$(srcdir)/tests/stacking/basic-wayland.metatest \
$(srcdir)/tests/stacking/closed-transient.metatest \
$(srcdir)/tests/stacking/minimized.metatest \
$(srcdir)/tests/stacking/mixed-windows.metatest \
$(srcdir)/tests/stacking/set-parent.metatest \

View File

@ -0,0 +1,19 @@
new_client 1 wayland
create 1/1
show 1/1
new_client 2 wayland
create 2/1
show 2/1
create 1/2
show 1/2
set_parent 1/2 1
wait
assert_stacking 1/1 2/1 1/2
destroy 1/2
wait
assert_stacking 2/1 1/1