1 <?xml version="1.0" standalone="no"?>
2 <svg width="600" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()">
3 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"></script>
4 <path d="M50,150 l45,-43 l24,64 l-69,-21z" fill="#FF0000" stroke="#000000" stroke-width="5"/>
5 <text x="10" y="20" style="font-weight:bold">Right after loading, a segment is added to the path.</text>
6 <text x="10" y="40" style="font-weight:bold">The path and its attribute should be updated to include the new segment.</text>
8 <text x="10" y="70">"d" initial: </text>
9 <text id="d_start" x="90" y="70"></text>
11 <text x="10" y="90">"d" after: </text>
12 <text id="d_end" x="90" y="90"></text>
14 <script type="text/javascript">
16 function repaintTest() {
17 var path = document.getElementsByTagName('path')[0];
18 var start = document.getElementById('d_start');
19 var end = document.getElementById('d_end');
21 var start_d = path.getAttribute('d');
22 start.textContent = start_d;
23 var list = path.pathSegList;
24 var seg = path.createSVGPathSegLinetoRel(50, 50);
26 list.insertItemBefore(seg, 2);
27 var end_d = path.getAttribute('d');
28 end.textContent = end_d;
29 if(start_d == end_d) {
30 end.textContent += ' (failed)';