sd/qa/unit/tiledrendering/tiledrendering.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
New commits: commit a2cdea138f3f6285b1e11b9b0136a8746deabe09 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Sep 23 07:52:04 2025 -0400 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Sep 23 15:31:47 2025 +0200 sd: test: add unit test for accessibility slide content Change-Id: Id10950a3eaa32686fbf2f0ff421a12e7f4a77b5d Signed-off-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191395 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 4e0372ab1ba7..2bbf4aee1865 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2832,6 +2832,32 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) } } +CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testA11yPresentationInfo) +{ + SdXImpressDocument* pXImpressDocument = createDoc("PresentationInfoTest.odp"); + pXImpressDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>()); + + Scheduler::ProcessEventsToIdle(); + + OString aPresentInfo = pXImpressDocument->getPresentationInfo(true); + + boost::property_tree::ptree aTree; + std::stringstream aStream((std::string(aPresentInfo))); + boost::property_tree::read_json(aStream, aTree); + + CPPUNIT_ASSERT_EQUAL(size_t(5), aTree.get_child("slides").size()); + + // Slide Index 0 + { + const boost::property_tree::ptree& rChild = child_at(aTree, "slides", 0); + CPPUNIT_ASSERT_EQUAL(0, rChild.get_child("index").get_value<int>()); + CPPUNIT_ASSERT_EQUAL(false, rChild.get_child("empty").get_value<bool>()); + + CPPUNIT_ASSERT(rChild.get_child("a11y").get_value<std::string>().length() > 0); + CPPUNIT_ASSERT(rChild.get_child("transitionLabel").get_value<std::string>().length() > 0); + } +} + namespace { std::string GetSlideHash(SdXImpressDocument* pDoc, sal_Int32 nSlideNumber)