tests/stacking: Add test to verify we unmaximize correctly

The test tests that (for both X11 and Wayland) that:

 * The client unmaximizes after mapping maximized to a predictable size
 * That the client unmaximizes to the same size after toggling maximize

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
This commit is contained in:
Jonas Ådahl 2020-04-02 16:20:34 +02:00 committed by Georges Basile Stavracas Neto
parent 62f449d7d5
commit 4571de5772
2 changed files with 54 additions and 0 deletions

View File

@ -141,6 +141,7 @@ stacking_tests = [
'override-redirect', 'override-redirect',
'set-override-redirect-parent', 'set-override-redirect-parent',
'set-parent-exported', 'set-parent-exported',
'restore-size',
] ]
foreach stacking_test: stacking_tests foreach stacking_test: stacking_tests

View File

@ -0,0 +1,53 @@
# Check that X11 clients restore to their right size after unmaximize
new_client x x11
create x/1 csd
resize x/1 500 400
maximize x/1
show x/1
wait
assert_size x/1 MONITOR_WIDTH MONITOR_HEIGHT
unmaximize x/1
wait
assert_size x/1 500 400
resize x/1 300 200
wait
maximize x/1
wait_reconfigure
unmaximize x/1
wait_reconfigure
assert_size x/1 300 200
# Check that Wayland clients restore to their right size after unmaximize
new_client w wayland
create w/1 csd
resize w/1 150 300
maximize w/1
show w/1
wait
assert_size w/1 MONITOR_WIDTH MONITOR_HEIGHT
unmaximize w/1
wait_reconfigure
assert_size w/1 150 300
resize w/1 300 200
wait
maximize w/1
wait_reconfigure
unmaximize w/1
wait_reconfigure
assert_size w/1 300 200