tests: Make accessibility-dump output selected children by name
And put one child in every row to make diffing easier.
This commit is contained in:
committed by
Matthias Clasen
parent
4ca42d9785
commit
e0324064bc
@ -87,7 +87,7 @@ window1
|
|||||||
alpha: 1
|
alpha: 1
|
||||||
<AtkSelection>
|
<AtkSelection>
|
||||||
selection count: 1
|
selection count: 1
|
||||||
selected children: 0
|
selected children: unnamed-GailNotebookPage-4
|
||||||
unnamed-GailNotebookPage-4
|
unnamed-GailNotebookPage-4
|
||||||
"page tab"
|
"page tab"
|
||||||
parent: unnamed-GailNotebook-3
|
parent: unnamed-GailNotebook-3
|
||||||
|
|||||||
@ -402,14 +402,20 @@ dump_atk_selection (AtkSelection *atk_selection,
|
|||||||
{
|
{
|
||||||
if (atk_selection_is_child_selected (atk_selection, i))
|
if (atk_selection_is_child_selected (atk_selection, i))
|
||||||
{
|
{
|
||||||
|
AtkObject *object = atk_object_ref_accessible_child (ATK_OBJECT (atk_selection), i);
|
||||||
|
|
||||||
|
g_assert (object);
|
||||||
|
|
||||||
if (n_counted_selections == 0)
|
if (n_counted_selections == 0)
|
||||||
g_string_append_printf (string, "%*sselected children:", depth, "");
|
{
|
||||||
g_string_append_printf (string, " %d", i);
|
g_string_append_printf (string, "%*sselected children: %s\n", depth, "", get_name (object));
|
||||||
|
depth += strlen ("selected children: ");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_string_append_printf (string, "%*s%s\n", depth, "", get_name (object));
|
||||||
n_counted_selections++;
|
n_counted_selections++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n_counted_selections)
|
|
||||||
g_string_append_c (string, '\n');
|
|
||||||
|
|
||||||
g_assert_cmpint (n_selections, ==, n_counted_selections);
|
g_assert_cmpint (n_selections, ==, n_counted_selections);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ window1
|
|||||||
alpha: 1
|
alpha: 1
|
||||||
<AtkSelection>
|
<AtkSelection>
|
||||||
selection count: 1
|
selection count: 1
|
||||||
selected children: 0
|
selected children: Tab 1
|
||||||
Tab 1
|
Tab 1
|
||||||
"page tab"
|
"page tab"
|
||||||
parent: notebook1
|
parent: notebook1
|
||||||
|
|||||||
@ -17,7 +17,8 @@ window1
|
|||||||
alpha: 1
|
alpha: 1
|
||||||
<AtkSelection>
|
<AtkSelection>
|
||||||
selection count: 2
|
selection count: 2
|
||||||
selected children: 2 3
|
selected children: One
|
||||||
|
Two
|
||||||
<AtkTable>
|
<AtkTable>
|
||||||
rows: 4
|
rows: 4
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user