From 3426dcfec2b4d5c755024c355f323ecc9f656e4a Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 5 Apr 2023 15:39:25 +0200 Subject: vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layer Add tests for the GTK3 accessibility platform layer. These tests compare the internal LO representation with what is visible to the platform, and thus the user's accessibility tools. In most cases the tests are fairly trivial as LO's internals are not far off AT-SPI2's expectations. There are however notable exceptions like for example the text attributes, that have a wildly different representation and require more complex checks matching what LO's platform layer does, the other way around. These tests use libatspi2 directly, but as the C API is awful to work with regarding resource management, there are wrappers to handle the complexity using RAII. The resulting API is fairly trivial to use. As these tests require using the GTK3 VCL plugin and for the a11y tree to be visible to AT-SPI2, they are run under XVFB using a separate dbus session through dbus-launch. Working on this has already lead to reporting and/or solving some issues: * https://gerrit.libreoffice.org/c/core/+/151303 * https://gerrit.libreoffice.org/c/core/+/151650 * https://gerrit.libreoffice.org/c/core/+/152456 * https://gerrit.libreoffice.org/c/core/+/152457 * https://bugs.documentfoundation.org/show_bug.cgi?id=155625 * https://bugs.documentfoundation.org/show_bug.cgi?id=155705 * https://gerrit.libreoffice.org/c/core/+/152748 Only a subset of the a11y APIs are covered for the moment, but the current state should make it easy to extend upon. Change-Id: I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153069 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/Module_vcl.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vcl/Module_vcl.mk') diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 5c6fbe987430..704b324622fe 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -82,6 +82,12 @@ ifneq ($(ENABLE_GTK3),) $(eval $(call gb_Module_add_targets,vcl,\ Library_vclplug_gtk3 \ )) + +ifneq ($(ENABLE_ATSPI_TESTS),) +$(eval $(call gb_Module_add_check_targets,vcl,\ + CppunitTest_vcl_gtk3_a11y \ +)) +endif endif ifneq ($(ENABLE_GTK4),) -- cgit