From 2ce622f057874dccfbac3344758f4b472d8c6208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 1 Apr 2020 23:04:59 +0200 Subject: [PATCH] tests/test-runner: Plumb "resize" command The test client could already understand the resize command, but they could not be added to metatests as the command was not properly plumbed via the test runner. Establish the plumbing for the resize command so that resize tests can be added. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171 --- src/tests/test-runner.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c index cd47addb4..98292d5d8 100644 --- a/src/tests/test-runner.c +++ b/src/tests/test-runner.c @@ -504,6 +504,20 @@ test_case_do (TestCase *test, test_client_wait_for_window_shown (client, window); } + else if (strcmp (argv[0], "resize") == 0) + { + if (argc != 4) + BAD_COMMAND("usage: %s / width height", argv[0]); + + TestClient *client; + const char *window_id; + if (!test_case_parse_window_id (test, argv[1], &client, &window_id, error)) + return FALSE; + + if (!test_client_do (client, error, argv[0], window_id, + argv[2], argv[3], NULL)) + return FALSE; + } else if (strcmp (argv[0], "hide") == 0 || strcmp (argv[0], "activate") == 0 || strcmp (argv[0], "raise") == 0 ||