diff options
author | Suneel BS <suneel.b-s@nokia.com> | 2009-05-07 16:09:53 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-06-22 13:26:18 (GMT) |
commit | d6daae2c0dbab5c547f4bdec2d3bafe3a5ed62b6 (patch) | |
tree | 254af48db44ed130b55d541cc571f4b8ff92db6f /tests/auto/qsvgrenderer | |
parent | 87fc9a9a6fa74973a5812fb495615edb4df10e27 (diff) | |
download | Qt-d6daae2c0dbab5c547f4bdec2d3bafe3a5ed62b6.zip Qt-d6daae2c0dbab5c547f4bdec2d3bafe3a5ed62b6.tar.gz Qt-d6daae2c0dbab5c547f4bdec2d3bafe3a5ed62b6.tar.bz2 |
Fixed forward gradient reference in the SVG module.
Autotest added by Kim.
Task-number: 204686
Reviewed-by: Kim
Diffstat (limited to 'tests/auto/qsvgrenderer')
-rw-r--r-- | tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index c7bfee8..820bcba 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -75,6 +75,7 @@ private slots: void stylePropagation() const; void matrixForElement() const; void gradientStops() const; + void gradientRefs(); void fillRule(); void opacity(); void paths(); @@ -535,7 +536,10 @@ void tst_QSvgRenderer::gradientStops() const QCOMPARE(image, refImage); } +} +void tst_QSvgRenderer::gradientRefs() +{ const char *svgs[] = { "<svg>" "<defs>" @@ -567,6 +571,17 @@ void tst_QSvgRenderer::gradientStops() const "</linearGradient>" "</defs>" "<rect fill=\"url(#gradient)\" height=\"8\" width=\"256\" x=\"0\" y=\"0\"/>" + "</svg>", + "<svg>" + "<rect fill=\"url(#gradient)\" height=\"8\" width=\"256\" x=\"0\" y=\"0\"/>" + "<defs>" + "<linearGradient id=\"gradient0\">" + "<stop offset=\"0\" stop-color=\"red\" stop-opacity=\"0\"/>" + "<stop offset=\"1\" stop-color=\"blue\"/>" + "</linearGradient>" + "<linearGradient id=\"gradient\" xlink:href=\"#gradient0\">" + "</linearGradient>" + "</defs>" "</svg>" }; for (int i = 0 ; i < sizeof(svgs) / sizeof(svgs[0]) ; ++i) @@ -591,6 +606,7 @@ void tst_QSvgRenderer::gradientStops() const } } + #ifndef QT_NO_COMPRESS void tst_QSvgRenderer::testGzLoading() { |