Kaydet (Commit) 93cf43de authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Xisco Faulí

SVG: Add unittest for #i125329#

Change-Id: I2d6fbd81c8d95283cf8937739e338ddac14d8df0
Reviewed-on: https://gerrit.libreoffice.org/24008Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarXisco Faulí <anistenis@gmail.com>
üst c108fbe0
......@@ -55,6 +55,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void testTdf97936();
void testClipPathAndParentStyle();
void testClipPathAndStyle();
void testi125329();
Primitive2DSequence parseSvg(const char* aSource);
......@@ -80,6 +81,7 @@ public:
CPPUNIT_TEST(testTdf97936);
CPPUNIT_TEST(testClipPathAndParentStyle);
CPPUNIT_TEST(testClipPathAndStyle);
CPPUNIT_TEST(testi125329);
CPPUNIT_TEST_SUITE_END();
};
......@@ -444,6 +446,30 @@ void Test::testClipPathAndStyle()
}
void Test::testi125329()
{
//Check style inherit from * css element
Primitive2DSequence aSequencei125329 = parseSvg("/svgio/qa/cppunit/data/i125329.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequencei125329.getLength());
Primitive2dXmlDump dumper;
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequencei125329));
CPPUNIT_ASSERT (pDocument);
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "color", "#c0c0c0"); // rect background color
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "height", "30"); // rect background height
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "width", "50"); // rect background width
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "minx", "15");
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "miny", "15");
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "maxx", "65");
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor", "maxy", "45");
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line", "color", "#008000"); // rect stroke color
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line", "width", "1"); // rect stroke width
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment