summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2017-03-24 15:04:21 -0500
committerMike Gorse <mgorse@suse.com>2017-03-24 15:04:21 -0500
commita0d9e9fd97beefb2cac3972faae12411519e6ecb (patch)
tree91c295338a234803db740da82f33c0a69d6d7239 /tests
parentb1953a03dee8728ae0223348b8347489bfd0523f (diff)
downloadat-spi2-atk-a0d9e9fd97beefb2cac3972faae12411519e6ecb.tar.gz
Fix Position getter for table cells
Diffstat (limited to 'tests')
-rw-r--r--tests/atk_test_table_cell.c24
-rw-r--r--tests/dummyatk/my-atk-table-cell.c2
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/atk_test_table_cell.c b/tests/atk_test_table_cell.c
index 082ce1d..6b629b8 100644
--- a/tests/atk_test_table_cell.c
+++ b/tests/atk_test_table_cell.c
@@ -140,6 +140,28 @@ atk_test_table_cell_get_row_column_span (gpointer fixture, gconstpointer user_da
}
static void
+atk_test_table_cell_get_position (gpointer fixture, gconstpointer user_data)
+{
+ AtspiAccessible *_obj = get_root_obj (DATA_FILE);
+ g_assert (_obj);
+ AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
+ g_assert (child);
+
+ AtspiAccessible *cell = atspi_accessible_get_child_at_index (child, 9, NULL);
+ AtspiTableCell *obj = atspi_accessible_get_table_cell (cell);
+ g_assert (cell);
+
+ gint row = 10;
+ gint column = 10;
+
+ atspi_table_cell_get_position (obj, &row, &column, NULL);
+
+ /* TODO: not a very good test for the app to return (-1, -1) */
+ g_assert_cmpint (row, ==, -1);
+ g_assert_cmpint (column, ==, -1);
+}
+
+static void
atk_test_table_cell_get_table (gpointer fixture, gconstpointer user_data)
{
AtspiAccessible *_obj = get_root_obj (DATA_FILE);
@@ -181,6 +203,8 @@ atk_test_table_cell (void)
*/
g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_row_column_span",
0, NULL, NULL, atk_test_table_cell_get_row_column_span, teardown_table_cell_test);
+ g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_position",
+ 0, NULL, NULL, atk_test_table_cell_get_position, teardown_table_cell_test);
g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_table",
0, NULL, NULL, atk_test_table_cell_get_table, teardown_table_cell_test);
diff --git a/tests/dummyatk/my-atk-table-cell.c b/tests/dummyatk/my-atk-table-cell.c
index 2d1c568..b22eaf5 100644
--- a/tests/dummyatk/my-atk-table-cell.c
+++ b/tests/dummyatk/my-atk-table-cell.c
@@ -134,7 +134,7 @@ my_atk_tablecell_get_position (AtkTableCell *obj, gint *row , gint *column)
*row = self->xy[0];
*column = self->xy[1];
- return FALSE;
+ return TRUE;
}
static GPtrArray *