[at-spi2-core: 15/17] Test GetChildAtIndex for an empty registry




commit 13091f13a4392c9296153746cd7201cdbcb1b525
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Oct 11 19:11:17 2022 -0500

    Test GetChildAtIndex for an empty registry
    
    In the registryd tests, we don't yet have a way to populate it with
    mock accessible apps.  Anyway, those are hopefully tested in the
    at-spi2-atk.

 tests/registryd/test_root_accessible.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/tests/registryd/test_root_accessible.py b/tests/registryd/test_root_accessible.py
index b8f1da02..8a4d5dea 100644
--- a/tests/registryd/test_root_accessible.py
+++ b/tests/registryd/test_root_accessible.py
@@ -27,6 +27,11 @@ def test_accessible_iface_properties(registry_root, session_manager):
 def test_unknown_property_yields_error(registry_root, session_manager):
     check_unknown_property_yields_error(registry_root, ACCESSIBLE_IFACE)
 
+def test_get_child_at_index_for_empty_registry(registry_root, session_manager):
+    # FIXME: Shouldn't this return an error, rather than a null reference?
+    (name, path) = registry_root.GetChildAtIndex(0, dbus_interface=ACCESSIBLE_IFACE)
+    assert path == '/org/a11y/atspi/null'
+
 def test_root_get_index_in_parent(registry_root, session_manager):
     # The registry root is always index 0
     assert registry_root.GetIndexInParent(dbus_interface=ACCESSIBLE_IFACE) == 0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]