blob: 61548b6f6bd9e2aa17948d4f68f74fc39032330c [file] [log] [blame]
<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg">
<script src="../../resources/ahem.js"></script>
<text id="text" x="10" y="1em">AAA <tspan id="tspan">BBB</tspan> CCC</text>
<defs>
<style type="text/css">
<![CDATA[
text {
font-family: Ahem;
font-size: 40px;
}
]]>
</style>
<script type="text/javascript">
<![CDATA[
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
// (15,15) is within an 'A' glyph cell of #text.
// (110,15) is within a 'B' glyph cell of #tspan.
var text = document.getElementById("text");
if (document.elementFromPoint(15, 15) === text && document.elementFromPoint(110, 15) === document.getElementById("tspan"))
text.textContent = "PASS";
else
text.textContent = "FAIL";
}
]]>
</script>
</defs>
</svg>