Commit e0324064 authored by Benjamin Otte's avatar Benjamin Otte Committed by Matthias Clasen
Browse files

tests: Make accessibility-dump output selected children by name

And put one child in every row to make diffing easier.
parent 4ca42d97
...@@ -87,7 +87,7 @@ window1 ...@@ -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, ...@@ -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 ...@@ -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 ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment