tests: Move 'wait-for-X11-display' helper to MetaContextTest

Gets rid of a un-prefixed helper function relying on a global singleton.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl
2021-05-11 09:35:04 +02:00
parent e8742be568
commit 724a7eee74
10 changed files with 80 additions and 37 deletions

View File

@ -19,6 +19,8 @@
#include "config.h"
#include "tests/unit-tests.h"
#include <glib.h>
#include <stdlib.h>
@ -35,6 +37,8 @@
#include "tests/monitor-transform-tests.h"
#include "tests/wayland-unit-tests.h"
MetaContext *test_context;
typedef struct _MetaTestLaterOrderCallbackData
{
GMainLoop *loop; /* Loop to terminate when done. */
@ -239,6 +243,8 @@ main (int argc, char *argv[])
META_CONTEXT_TEST_FLAG_TEST_CLIENT);
g_assert (meta_context_configure (context, &argc, &argv, NULL));
test_context = context;
init_tests ();
g_signal_connect (context, "before-tests",