From c54784beade263fc8cb1a0b240dc3974887f22a3 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Tue, 12 Jan 2021 17:55:08 +0100 Subject: filter: svg: slide custom background unit test Change-Id: I29990218bfa6095c368ed36ebc9cca909d2136fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109189 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti --- sd/qa/unit/SVGExportTests.cxx | 12 ++++++++++++ sd/qa/unit/data/odp/slide-custom-background.odp | Bin 0 -> 40023 bytes 2 files changed, 12 insertions(+) create mode 100644 sd/qa/unit/data/odp/slide-custom-background.odp diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx index 8c55bf45d48b..57e5f3fcfc0a 100644 --- a/sd/qa/unit/SVGExportTests.cxx +++ b/sd/qa/unit/SVGExportTests.cxx @@ -23,6 +23,7 @@ #define SVG_G *[name()='g'] #define SVG_TEXT *[name()='text'] #define SVG_TSPAN *[name()='tspan'] +#define SVG_DEFS *[name()='defs'] using namespace css; @@ -124,9 +125,20 @@ public: 1); } + void testSVGExporSlidetCustomBackground() + { + executeExport("slide-custom-background.odp"); + + xmlDocPtr svgDoc = parseXml(maTempFile); + CPPUNIT_ASSERT(svgDoc); + + assertXPath(svgDoc, MAKE_PATH_STRING( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class", "SlideBackground"); + } + CPPUNIT_TEST_SUITE(SdSVGFilterTest); CPPUNIT_TEST(testSVGExportTextDecorations); CPPUNIT_TEST(testSVGExportJavascriptURL); + CPPUNIT_TEST(testSVGExporSlidetCustomBackground); CPPUNIT_TEST_SUITE_END(); }; diff --git a/sd/qa/unit/data/odp/slide-custom-background.odp b/sd/qa/unit/data/odp/slide-custom-background.odp new file mode 100644 index 000000000000..df07c6f34579 Binary files /dev/null and b/sd/qa/unit/data/odp/slide-custom-background.odp differ -- cgit