widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_LARGE_TOOLBAR);
test_window_add_and_show (GTK_CONTAINER (vbox), widget);
-
+
widget = g_object_new (GTK_TYPE_RANGE, NULL);
gtk_range_set_range (GTK_RANGE (widget), 0.0, 100.0);
test_window_add_and_show (GTK_CONTAINER (vbox), widget);
}
static void
+test_action (AccessibleAction *action)
+{
+ gint n_actions, i;
+ gchar *s, *sd;
+ g_assert ((n_actions = AccessibleAction_getNActions (action)) >= 0);
+
+ fprintf (stderr, "Testing actions...");
+ for (i = 0; i < n_actions; ++i)
+ {
+ s = AccessibleAction_getName (action, i);
+ g_assert (s);
+ sd = AccessibleAction_getDescription (action, i);
+ g_assert (sd);
+ fprintf (stderr, "%d: %s (%s); ", i, s, sd);
+ SPI_freeString (s);
+ SPI_freeString (sd);
+ /* g_assert (AccessibleAction_doAction (action, i)); */
+ }
+ fprintf (stderr, "\n");
+}
+
+static void
test_desktop (void)
{
Accessible *desktop;
gboolean has_parent,
gboolean recurse_down)
{
- Accessible *tmp;
- char *name, *descr;
- const char *role;
- GString *item_str = g_string_new ("");
+ Accessible *tmp;
+ char *name, *descr;
+ AccessibleRole role;
+ char *role_name;
+ GString *item_str = g_string_new ("");
name = Accessible_getName (accessible);
g_assert (name != NULL);
g_assert (descr != NULL);
role = Accessible_getRole (accessible);
- g_assert (role != NULL);
+ g_assert (role != SPI_ROLE_INVALID);
+ role_name = Accessible_getRoleName (accessible);
+ g_assert (role_name != NULL);
+
if (print_tree) {
int i;
g_assert (tmp != NULL);
if (print_tree)
fprintf (stderr, "At");
+ else
+ test_action (tmp);
AccessibleAction_unref (tmp);
}
if (print_tree)
fprintf (stderr, " ] '%s' (%s) - %s: %s\n",
- name, descr, role, item_str->str);
+ name, descr, role_name, item_str->str);
SPI_freeString (name);
SPI_freeString (descr);
+ SPI_freeString (role_name);
g_string_free (item_str, TRUE);
validate_tree (accessible, has_parent, recurse_down);