1
0
Fork 0

tests/utils: Add test_client_quit() helper

https://bugzilla.gnome.org/show_bug.cgi?id=730551
This commit is contained in:
Jonas Ådahl 2017-08-18 14:23:42 +08:00
parent 2df4ccd1cd
commit 5b37901b57
3 changed files with 17 additions and 4 deletions

View file

@ -365,10 +365,7 @@ test_case_do (TestCase *test,
if (!client)
return FALSE;
if (!test_client_do (client, error, "destroy_all", NULL))
return FALSE;
if (!test_client_wait (client, error))
if (!test_client_quit (client, error))
return FALSE;
g_hash_table_remove (test->clients, test_client_get_id (client));

View file

@ -396,6 +396,19 @@ test_client_new (const char *id,
return client;
}
gboolean
test_client_quit (TestClient *client,
GError **error)
{
if (!test_client_do (client, error, "destroy_all", NULL))
return FALSE;
if (!test_client_wait (client, error))
return FALSE;
return TRUE;
}
void
test_client_destroy (TestClient *client)
{

View file

@ -70,6 +70,9 @@ MetaWindow * test_client_find_window (TestClient *client,
const char *window_id,
GError **error);
gboolean test_client_quit (TestClient *client,
GError **error);
TestClient * test_client_new (const char *id,
MetaWindowClientType type,
GError **error);