2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility)
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #include "atk_test_util.h"
26 static void assert_clean_exit (int sig)
28 kill (child_pid, SIGTERM);
31 void clean_exit_on_fail ()
33 signal (SIGABRT, assert_clean_exit);
37 run_app (const char *file_name)
50 AtspiAccessible * get_root_obj (const char *file_name)
53 AtspiAccessible *obj = NULL;
57 /* sleep is needed to wait for fored test application*/
60 obj = atspi_get_desktop (0);
61 gint child_count = atspi_accessible_get_child_count (obj, NULL);
62 if (child_count < 1) {
63 g_test_message ("Fail, test application not found\n");
65 kill (child_pid, SIGTERM);
69 for (i=0; i<child_count; i++) {
70 AtspiAccessible *child = atspi_accessible_get_child_at_index (obj,i, NULL);
71 if (!strcmp (atspi_accessible_get_name (child, NULL), "root_object"))
74 g_test_message ("test object not found\n");
77 kill (child_pid, SIGTERM);