diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-03-04 09:38:02 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-28 12:43:59 +0100 |
commit | f62c1ca76fff9f95c537a4b392b1473f14751903 (patch) | |
tree | 69a2efd21510fe8e6e94a5d370a1da27c8d23ff9 /sd/qa/unit/SVGExportTests.cxx | |
parent | 2707e4b156e2398db964a00c2cae517efdf5e86c (diff) |
Check svg URLs before exportingcp-5.3-64
Reviewed-on: https://gerrit.libreoffice.org/68668
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648)
Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed
Diffstat (limited to 'sd/qa/unit/SVGExportTests.cxx')
-rw-r--r-- | sd/qa/unit/SVGExportTests.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx index d241822caecc..4269c817f833 100644 --- a/sd/qa/unit/SVGExportTests.cxx +++ b/sd/qa/unit/SVGExportTests.cxx @@ -111,8 +111,23 @@ public: assertXPath(svgDoc, MAKE_PATH_STRING( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN ), "text-decoration", "line-through"); } + void testSVGExportJavascriptURL() + { + executeExport("textbox-link-javascript.odp"); + + xmlDocPtr svgDoc = parseXml(maTempFile); + CPPUNIT_ASSERT(svgDoc); + + // There should be only one child (no link to javascript url) + assertXPathChildren(svgDoc, + MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / SVG_G / SVG_G / SVG_G + / SVG_G[4] / SVG_G), + 1); + } + CPPUNIT_TEST_SUITE(SdSVGFilterTest); CPPUNIT_TEST(testSVGExportTextDecorations); + CPPUNIT_TEST(testSVGExportJavascriptURL); CPPUNIT_TEST_SUITE_END(); }; |