sd/qa/unit/tiledrendering/tiledrendering.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
New commits: commit 88343ea8c11ac8ec566b113bf6ce6f7809ee8ce0 Author: Henry Castro <[email protected]> AuthorDate: Tue Sep 23 07:52:04 2025 -0400 Commit: Henry Castro <[email protected]> CommitDate: Wed Oct 22 20:31:33 2025 +0200 sd: test: add unit test for accessibility slide content Change-Id: Id10950a3eaa32686fbf2f0ff421a12e7f4a77b5d Signed-off-by: Henry Castro <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191395 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192869 Tested-by: Jenkins diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 0c144ecdfd59..060f679858b2 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2827,6 +2827,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)
