tests/test-runner: Add toggle_overview command

This will emit the `overlay-key` key which will be handled by the test
shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185>
This commit is contained in:
Jonas Ådahl 2023-08-15 22:10:31 +02:00 committed by Marge Bot
parent 8268ec2ee8
commit 587c31b611

View File

@ -1308,6 +1308,15 @@ test_case_do (TestCase *test,
BAD_COMMAND("Unknown preference %s", argv[1]);
}
}
else if (strcmp (argv[0], "toggle_overview") == 0)
{
MetaDisplay *display = meta_context_get_display (test->context);
if (argc != 1)
BAD_COMMAND ("usage: %s", argv[0]);
g_signal_emit_by_name (display, "overlay-key", 0);
}
else
{
BAD_COMMAND("Unknown command %s", argv[0]);