2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
5 <defs><path id=
"p" d=
"M0,20h100"/></defs>
6 <text y=
"20" font-size=
"20" font-family=
"Ahem"><textPath xlink:
href=
"#p">AAAA
</textPath></text>
10 var text
= document
.querySelector('text');
11 var extents
= text
.getExtentOfChar(0);
12 var point
= document
.querySelector('svg').createSVGPoint();
13 point
.x
= extents
.width
/ 2;
15 for (var i
= 0; i
< 4; ++i
) {
16 assert_equals(text
.getCharNumAtPosition(point
), i
);
18 point
.x
+= extents
.width
;
20 }, 'SVGTextContentElement.getCharNumAtPosition w/ multiple fragments per text box.');