Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<html>
<head>
<title>SVG Text attributes tests</title>
<meta charset="utf-8">
<link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script src="../common.js"></script>
<script src="../attributes.js"></script>
<script src="../events.js"></script>
<script>
function doTest() {
const svg = getNode("svg");
const defAttrs = buildDefaultTextAttrs(svg, "10pt");
testDefaultTextAttrs(svg, defAttrs);
testTextAttrs(svg, 0, {}, defAttrs, 0, 2);
const g = getNode("g");
testTextAttrs(g, 0, {}, defAttrs, 0, 2);
const a = getNode("a");
const aDefAttrs = buildDefaultTextAttrs(a, "10pt");
testTextAttrs(a, 0, {}, aDefAttrs, 0, 1);
const f3 = getNode("f3");
testTextAttrs(f3, 0, {}, defAttrs, 0, 2);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body style="font-size: 12pt">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<svg id="svg" style="font-size: smaller">
<foreignobject>f1</foreignobject>
<g id="g">
<title>g</title>
<foreignobject>f2</foreignobject>
</g>
<text><a href="#" id="a">a</a></text>
<foreignobject id="f3" role="button"><body>f3</body></foreignobject>
</svg>
</body>
</html>