tests: Add checks for row/column index to accessibility-dump
This commit is contained in:
@ -520,7 +520,7 @@ dump_atk_table (AtkTable *table,
|
|||||||
{
|
{
|
||||||
gint *selected;
|
gint *selected;
|
||||||
gint n_selected;
|
gint n_selected;
|
||||||
gint i;
|
gint i, j;
|
||||||
AtkObject *obj;
|
AtkObject *obj;
|
||||||
const gchar *desc;
|
const gchar *desc;
|
||||||
|
|
||||||
@ -579,6 +579,26 @@ dump_atk_table (AtkTable *table,
|
|||||||
if (obj)
|
if (obj)
|
||||||
g_string_append_printf (string, "%*srow %d header: %s\n", depth, "", i, get_name (obj));
|
g_string_append_printf (string, "%*srow %d header: %s\n", depth, "", i, get_name (obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_string_append_printf (string, "%*stable indexes:\n", depth, "");
|
||||||
|
for (i = 0; i < atk_table_get_n_rows (table); i++)
|
||||||
|
{
|
||||||
|
g_string_append_printf (string, "%*s", depth + DEPTH_INCREMENT, "");
|
||||||
|
for (j = 0; j < atk_table_get_n_columns (table); j++)
|
||||||
|
{
|
||||||
|
int id = atk_table_get_index_at (table, i, j);
|
||||||
|
|
||||||
|
obj = atk_object_ref_accessible_child (ATK_OBJECT (table), id);
|
||||||
|
if (j > 0)
|
||||||
|
g_string_append (string, " ");
|
||||||
|
|
||||||
|
g_string_append_printf (string, "%s%s%s",
|
||||||
|
atk_table_get_row_at_index (table, id) == i ? "✓" : "⚠",
|
||||||
|
atk_table_get_column_at_index (table, id) == j ? "✓" : "⚠",
|
||||||
|
get_name (obj));
|
||||||
|
}
|
||||||
|
g_string_append (string, "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -106,6 +106,8 @@ window1
|
|||||||
columns: 1
|
columns: 1
|
||||||
column 0 description:
|
column 0 description:
|
||||||
column 0 header: unnamed-GtkButtonAccessible-6
|
column 0 header: unnamed-GtkButtonAccessible-6
|
||||||
|
table indexes:
|
||||||
|
✓✓unnamed-GtkContainerCellAccessible-7
|
||||||
unnamed-GtkButtonAccessible-6
|
unnamed-GtkButtonAccessible-6
|
||||||
"table column header"
|
"table column header"
|
||||||
parent: unnamed-GtkTreeViewAccessible-5
|
parent: unnamed-GtkTreeViewAccessible-5
|
||||||
|
|||||||
@ -26,6 +26,11 @@ window1
|
|||||||
column 0 header: unnamed-GtkButtonAccessible-0
|
column 0 header: unnamed-GtkButtonAccessible-0
|
||||||
column 1 description: Column 2
|
column 1 description: Column 2
|
||||||
column 1 header: unnamed-GtkButtonAccessible-1
|
column 1 header: unnamed-GtkButtonAccessible-1
|
||||||
|
table indexes:
|
||||||
|
✓✓One ✓✓Two
|
||||||
|
✓✓Three ✓✓Four
|
||||||
|
✓✓Five ✓✓Six
|
||||||
|
✓✓Seven ✓✓Eight
|
||||||
unnamed-GtkButtonAccessible-0
|
unnamed-GtkButtonAccessible-0
|
||||||
"table column header"
|
"table column header"
|
||||||
parent: tree1
|
parent: tree1
|
||||||
|
|||||||
Reference in New Issue
Block a user