[mutter/gtk3-ci: 8/18] tests/stacking: Add test to verify we unmaximize correctly



commit e190efb7af58ad276f22606bd685df2b02a18aa3
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu Apr 2 16:20:34 2020 +0200

    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

 src/tests/meson.build                    |  1 +
 src/tests/stacking/restore-size.metatest | 51 ++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
---
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 8ca075f47..ed30535ce 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -141,6 +141,7 @@ stacking_tests = [
   'override-redirect',
   'set-override-redirect-parent',
   'set-parent-exported',
+  'restore-size',
 ]
 
 foreach stacking_test: stacking_tests
diff --git a/src/tests/stacking/restore-size.metatest b/src/tests/stacking/restore-size.metatest
new file mode 100644
index 000000000..d3e63bb1c
--- /dev/null
+++ b/src/tests/stacking/restore-size.metatest
@@ -0,0 +1,51 @@
+# 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
+maximize x/1
+wait
+unmaximize x/1
+wait
+
+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
+maximize w/1
+wait
+unmaximize w/1
+wait_reconfigure
+
+assert_size w/1 300 200


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]