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
This commit is contained in:
Jonas Ådahl 2020-04-01 23:04:59 +02:00 committed by Georges Basile Stavracas Neto
parent 76083d76af
commit 2ce622f057

View File

@ -504,6 +504,20 @@ test_case_do (TestCase *test,
test_client_wait_for_window_shown (client, window); test_client_wait_for_window_shown (client, window);
} }
else if (strcmp (argv[0], "resize") == 0)
{
if (argc != 4)
BAD_COMMAND("usage: %s <client-id>/<window-id> 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 || else if (strcmp (argv[0], "hide") == 0 ||
strcmp (argv[0], "activate") == 0 || strcmp (argv[0], "activate") == 0 ||
strcmp (argv[0], "raise") == 0 || strcmp (argv[0], "raise") == 0 ||