[mutter] monitor-unit-tests: Try resizing clients while headless



commit 563c5b061241768fcfe64234be64057ab627469b
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Feb 6 15:40:44 2018 +0800

    monitor-unit-tests: Try resizing clients while headless
    
    Prior to 6dcce19932 this test would crash.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790207

 src/tests/monitor-unit-tests.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index 0fd79a997..2b8207fc7 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -2927,6 +2927,7 @@ meta_test_monitor_no_outputs (void)
     }
   };
   MetaMonitorTestSetup *test_setup;
+  GError *error = NULL;
 
   test_setup = create_monitor_test_setup (&test_case,
                                           MONITOR_TEST_FLAG_NO_STORED);
@@ -2934,6 +2935,20 @@ meta_test_monitor_no_outputs (void)
   emulate_hotplug (test_setup);
   check_monitor_configuration (&test_case);
 
+  if (!test_client_do (x11_monitor_test_client, &error,
+                       "resize", X11_TEST_CLIENT_WINDOW,
+                       "123", "210",
+                       NULL))
+    g_error ("Failed to resize X11 window: %s", error->message);
+
+  if (!test_client_do (wayland_monitor_test_client, &error,
+                       "resize", WAYLAND_TEST_CLIENT_WINDOW,
+                       "123", "210",
+                       NULL))
+    g_error ("Failed to resize Wayland window: %s", error->message);
+
+  check_monitor_test_clients_state ();
+
   /* Also check that we handle going headless -> headless */
   test_setup = create_monitor_test_setup (&test_case,
                                           MONITOR_TEST_FLAG_NO_STORED);


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