summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-20 13:18:15 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-20 13:18:15 +0100
commitf84d0cc0165047183466a956589315ad41e946d0 (patch)
tree9dedb5dfde84d4a2732b79e454a48d92158efdbe /tests/auto
parent4dd6b2bfebf02223ef498bf52ce354c628cc9607 (diff)
parent984ba6977201f8fbd94d44a2b67519e1faf458cc (diff)
downloadqtsvg-f84d0cc0165047183466a956589315ad41e946d0.tar.gz
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: I7e158268343c5d92d666d266a87095f1154714dd
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
index 6ac865a..fd1b350 100644
--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
@@ -1308,6 +1308,17 @@ void tst_QSvgRenderer::testUseElement()
" <g fill = \"red\" fill-opacity =\"0.5\">"
" <use xlink:href =\"#usedG\" />"
" </g>"
+ "</svg>",
+ // Self referral, should be ignored
+ "<svg><g id=\"0\"><use xlink:href=\"#0\" /></g></svg>",
+ "<svg width=\"200\" height=\"200\">"
+ " <rect width=\"100\" height=\"50\"/>"
+ "</svg>",
+ "<svg width=\"200\" height=\"200\">"
+ " <g id=\"0\"><use xlink:href=\"#0\" /><rect width=\"100\" height=\"50\"/></g>"
+ "</svg>",
+ "<svg width=\"200\" height=\"200\">"
+ " <g id=\"0\"><g><use xlink:href=\"#0\" /><rect width=\"100\" height=\"50\"/></g></g>"
"</svg>"
};
@@ -1334,8 +1345,10 @@ void tst_QSvgRenderer::testUseElement()
// For this reason an exact comparison will fail.
QCOMPARE(images[4], images[i]);
}
- } else if (i > 7) {
+ } else if (i > 7 && i < 10) {
QCOMPARE(images[8], images[i]);
+ } else if (i > 11) {
+ QCOMPARE(images[11], images[i]);
}
}
}