diff options
author | Benjamin Otte <otte@redhat.com> | 2011-06-29 18:11:07 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-07-05 16:08:56 -0400 |
commit | e0324064bc292fa5f20d8e9317ae3e16e916567a (patch) | |
tree | 4daf574f124ef443aa44047a5351f88e0e67fbb5 /tests | |
parent | 4ca42d978557c3a15207eed7f9a06ad3870c7806 (diff) | |
download | gtk+-e0324064bc292fa5f20d8e9317ae3e16e916567a.tar.gz |
tests: Make accessibility-dump output selected children by name
And put one child in every row to make diffing easier.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/a11y/about.txt | 2 | ||||
-rw-r--r-- | tests/a11y/accessibility-dump.c | 14 | ||||
-rw-r--r-- | tests/a11y/notebook.txt | 2 | ||||
-rw-r--r-- | tests/a11y/tree.txt | 3 |
4 files changed, 14 insertions, 7 deletions
diff --git a/tests/a11y/about.txt b/tests/a11y/about.txt index 6bf8e886d9..58cca1d5c8 100644 --- a/tests/a11y/about.txt +++ b/tests/a11y/about.txt @@ -87,7 +87,7 @@ window1 alpha: 1 <AtkSelection> selection count: 1 - selected children: 0 + selected children: unnamed-GailNotebookPage-4 unnamed-GailNotebookPage-4 "page tab" parent: unnamed-GailNotebook-3 diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c index 1a1c21379c..38093ca5f9 100644 --- a/tests/a11y/accessibility-dump.c +++ b/tests/a11y/accessibility-dump.c @@ -402,14 +402,20 @@ dump_atk_selection (AtkSelection *atk_selection, { 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) - 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++; } } - if (n_counted_selections) - g_string_append_c (string, '\n'); g_assert_cmpint (n_selections, ==, n_counted_selections); } diff --git a/tests/a11y/notebook.txt b/tests/a11y/notebook.txt index c363093e0d..a517665360 100644 --- a/tests/a11y/notebook.txt +++ b/tests/a11y/notebook.txt @@ -17,7 +17,7 @@ window1 alpha: 1 <AtkSelection> selection count: 1 - selected children: 0 + selected children: Tab 1 Tab 1 "page tab" parent: notebook1 diff --git a/tests/a11y/tree.txt b/tests/a11y/tree.txt index cef74987a3..0713b5ee75 100644 --- a/tests/a11y/tree.txt +++ b/tests/a11y/tree.txt @@ -17,7 +17,8 @@ window1 alpha: 1 <AtkSelection> selection count: 2 - selected children: 2 3 + selected children: One + Two <AtkTable> rows: 4 columns: 2 |