[gtk+] tests: Add checks for row/column index to accessibility-dump
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Add checks for row/column index to accessibility-dump
- Date: Wed, 16 Nov 2011 03:43:45 +0000 (UTC)
commit 2e48bb2ccd59161e22bc39bbf3a18b225ab50818
Author: Benjamin Otte <otte redhat com>
Date: Tue Nov 15 22:29:45 2011 +0100
tests: Add checks for row/column index to accessibility-dump
tests/a11y/accessibility-dump.c | 22 +++++++++++++++++++++-
tests/a11y/appchooser.txt | 2 ++
tests/a11y/tree.txt | 5 +++++
3 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c
index 19c4edc..a092db7 100644
--- a/tests/a11y/accessibility-dump.c
+++ b/tests/a11y/accessibility-dump.c
@@ -520,7 +520,7 @@ dump_atk_table (AtkTable *table,
{
gint *selected;
gint n_selected;
- gint i;
+ gint i, j;
AtkObject *obj;
const gchar *desc;
@@ -579,6 +579,26 @@ dump_atk_table (AtkTable *table,
if (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
diff --git a/tests/a11y/appchooser.txt b/tests/a11y/appchooser.txt
index d2f9384..161d4d5 100644
--- a/tests/a11y/appchooser.txt
+++ b/tests/a11y/appchooser.txt
@@ -106,6 +106,8 @@ window1
columns: 1
column 0 description:
column 0 header: unnamed-GtkButtonAccessible-6
+ table indexes:
+ ââunnamed-GtkContainerCellAccessible-7
unnamed-GtkButtonAccessible-6
"table column header"
parent: unnamed-GtkTreeViewAccessible-5
diff --git a/tests/a11y/tree.txt b/tests/a11y/tree.txt
index 27f2b8d..8296929 100644
--- a/tests/a11y/tree.txt
+++ b/tests/a11y/tree.txt
@@ -26,6 +26,11 @@ window1
column 0 header: unnamed-GtkButtonAccessible-0
column 1 description: Column 2
column 1 header: unnamed-GtkButtonAccessible-1
+ table indexes:
+ ââOne ââTwo
+ ââThree ââFour
+ ââFive ââSix
+ ââSeven ââEight
unnamed-GtkButtonAccessible-0
"table column header"
parent: tree1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]