summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2021-01-12 17:55:08 +0100
committerAndras Timar <andras.timar@collabora.com>2021-03-31 10:39:14 +0200
commit9a7bd68d8b42fae731d8826a461954b81bf9139b (patch)
tree703dfcb439ec94be250015200e42a05ac02f52f5
parentc000b5eeaacf801588904c3642c2a21b7032af3e (diff)
filter: svg: slide custom background unit test
Change-Id: I29990218bfa6095c368ed36ebc9cca909d2136fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109189 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109868 Tested-by: Jenkins
-rw-r--r--sd/qa/unit/SVGExportTests.cxx12
-rw-r--r--sd/qa/unit/data/odp/slide-custom-background.odpbin0 -> 40023 bytes
2 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 4a06f3b4e897..76aad6a0e493 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -21,6 +21,7 @@
#define SVG_G *[name()='g']
#define SVG_TEXT *[name()='text']
#define SVG_TSPAN *[name()='tspan']
+#define SVG_DEFS *[name()='defs']
using namespace css;
@@ -122,9 +123,20 @@ public:
1);
}
+ void testSVGExporSlidetCustomBackground()
+ {
+ executeExport("slide-custom-background.odp");
+
+ xmlDocUniquePtr svgDoc = parseXml(maTempFile);
+ CPPUNIT_ASSERT(svgDoc);
+
+ assertXPath(svgDoc, SAL_STRINGIFY( /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
--- /dev/null
+++ b/sd/qa/unit/data/odp/slide-custom-background.odp
Binary files differ