a11y tests: Move helpers from toolkit to test

Move the XAccessibleComponentTester and XAccessibleContextTester
classes from toolkit to test, so they can be reused for a11y tests
in other modules.

Change-Id: I9a4bb3f96d92b05d58a5e8afe7f86b5eb2fd0c38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182967
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2025-03-15 20:50:09 +01:00
parent d1e90f2e26
commit f69fa9e372
7 changed files with 12 additions and 10 deletions
@@ -19,13 +19,15 @@
#pragma once
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <test/a11y/AccessibilityTools.hxx>
class XAccessibleComponentTester
class OOO_DLLPUBLIC_TEST XAccessibleComponentTester
{
private:
const css::uno::Reference<css::accessibility::XAccessibleComponent> mxComponent;
@@ -19,10 +19,12 @@
#pragma once
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
class XAccessibleContextTester
class OOO_DLLPUBLIC_TEST XAccessibleContextTester
{
protected:
const css::uno::Reference<css::accessibility::XAccessibleContext> mxContext;
+2
View File
@@ -47,6 +47,8 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/unoapi_test \
test/source/unoapixml_test \
test/source/a11y/AccessibilityTools \
test/source/a11y/XAccessibleComponentTester \
test/source/a11y/XAccessibleContextTester \
test/source/a11y/accessibletestbase \
test/source/a11y/eventposter \
test/source/beans/xpropertyset \
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "XAccessibleComponentTester.hxx"
#include <cppunit/TestAssert.h>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -31,6 +29,7 @@
#include <tools/color.hxx>
#include <test/a11y/AccessibilityTools.hxx>
#include <test/a11y/XAccessibleComponentTester.hxx>
using namespace css;
@@ -17,14 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "XAccessibleContextTester.hxx"
#include <cppunit/TestAssert.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <test/a11y/AccessibilityTools.hxx>
#include <test/a11y/XAccessibleContextTester.hxx>
/**
* @brief Tries to get every child and checks its parent.
-2
View File
@@ -11,8 +11,6 @@ $(eval $(call gb_CppunitTest_CppunitTest,toolkit_a11y))
$(eval $(call gb_CppunitTest_add_exception_objects,toolkit_a11y, \
toolkit/qa/cppunit/a11y/AccessibleStatusBarTest \
toolkit/qa/cppunit/a11y/XAccessibleComponentTester \
toolkit/qa/cppunit/a11y/XAccessibleContextTester \
toolkit/qa/cppunit/a11y/XAccessibleEventBroadcasterTester \
toolkit/qa/cppunit/a11y/XAccessibleExtendedComponentTester \
))
@@ -34,8 +34,8 @@
#include <vcl/scheduler.hxx>
#include <test/a11y/AccessibilityTools.hxx>
#include "XAccessibleComponentTester.hxx"
#include "XAccessibleContextTester.hxx"
#include <test/a11y/XAccessibleComponentTester.hxx>
#include <test/a11y/XAccessibleContextTester.hxx>
#include "XAccessibleExtendedComponentTester.hxx"
#include "XAccessibleEventBroadcasterTester.hxx"