a11y tests: Move more helpers from toolkit to test

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

Change-Id: I33e9ee43b9652e6cefcea2ee3264114109f8d9f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182982
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2025-03-15 11:53:41 -07:00
parent f3288f031a
commit 1b704035f5
7 changed files with 12 additions and 10 deletions

View File

@ -19,12 +19,14 @@
#pragma once #pragma once
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleContext.hpp> #include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/awt/XWindow.hpp>
class XAccessibleEventBroadcasterTester class OOO_DLLPUBLIC_TEST XAccessibleEventBroadcasterTester
{ {
private: private:
const css::uno::Reference<css::accessibility::XAccessibleEventBroadcaster> mxBroadcaster; const css::uno::Reference<css::accessibility::XAccessibleEventBroadcaster> mxBroadcaster;

View File

@ -19,10 +19,12 @@
#pragma once #pragma once
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
class XAccessibleExtendedComponentTester class OOO_DLLPUBLIC_TEST XAccessibleExtendedComponentTester
{ {
protected: protected:
const css::uno::Reference<css::accessibility::XAccessibleExtendedComponent> mxExtendedComponent; const css::uno::Reference<css::accessibility::XAccessibleExtendedComponent> mxExtendedComponent;

View File

@ -49,6 +49,8 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/a11y/AccessibilityTools \ test/source/a11y/AccessibilityTools \
test/source/a11y/XAccessibleComponentTester \ test/source/a11y/XAccessibleComponentTester \
test/source/a11y/XAccessibleContextTester \ test/source/a11y/XAccessibleContextTester \
test/source/a11y/XAccessibleEventBroadcasterTester \
test/source/a11y/XAccessibleExtendedComponentTester \
test/source/a11y/accessibletestbase \ test/source/a11y/accessibletestbase \
test/source/a11y/eventposter \ test/source/a11y/eventposter \
test/source/beans/xpropertyset \ test/source/beans/xpropertyset \

View File

@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "XAccessibleEventBroadcasterTester.hxx"
#include <iostream> #include <iostream>
#include <cppunit/TestAssert.h> #include <cppunit/TestAssert.h>
@ -39,6 +37,7 @@
#include <sal/log.hxx> #include <sal/log.hxx>
#include <test/a11y/AccessibilityTools.hxx> #include <test/a11y/AccessibilityTools.hxx>
#include <test/a11y/XAccessibleEventBroadcasterTester.hxx>
using namespace css; using namespace css;

View File

@ -17,11 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "XAccessibleExtendedComponentTester.hxx"
#include <iostream> #include <iostream>
#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
#include <test/a11y/XAccessibleExtendedComponentTester.hxx>
/** /**
* @brief Just calls the method. * @brief Just calls the method.

View File

@ -11,8 +11,6 @@ $(eval $(call gb_CppunitTest_CppunitTest,toolkit_a11y))
$(eval $(call gb_CppunitTest_add_exception_objects,toolkit_a11y, \ $(eval $(call gb_CppunitTest_add_exception_objects,toolkit_a11y, \
toolkit/qa/cppunit/a11y/AccessibleStatusBarTest \ toolkit/qa/cppunit/a11y/AccessibleStatusBarTest \
toolkit/qa/cppunit/a11y/XAccessibleEventBroadcasterTester \
toolkit/qa/cppunit/a11y/XAccessibleExtendedComponentTester \
)) ))
$(eval $(call gb_CppunitTest_use_libraries,toolkit_a11y, \ $(eval $(call gb_CppunitTest_use_libraries,toolkit_a11y, \

View File

@ -36,8 +36,8 @@
#include <test/a11y/AccessibilityTools.hxx> #include <test/a11y/AccessibilityTools.hxx>
#include <test/a11y/XAccessibleComponentTester.hxx> #include <test/a11y/XAccessibleComponentTester.hxx>
#include <test/a11y/XAccessibleContextTester.hxx> #include <test/a11y/XAccessibleContextTester.hxx>
#include "XAccessibleExtendedComponentTester.hxx" #include <test/a11y/XAccessibleExtendedComponentTester.hxx>
#include "XAccessibleEventBroadcasterTester.hxx" #include <test/a11y/XAccessibleEventBroadcasterTester.hxx>
using namespace css; using namespace css;