OLD | NEW |
1 <svg id="svgRoot" xmlns="http://www.w3.org/2000/svg" onload="go()"> | 1 <svg id="svgRoot" xmlns="http://www.w3.org/2000/svg" onload="go()"> |
2 <defs> | 2 <defs> |
3 <text> | 3 <text> |
4 <tspan id="tspan1" x="375"></tspan> | 4 <tspan id="tspan1" x="375"></tspan> |
5 <tspan>PASS</tspan> | 5 <tspan>PASS</tspan> |
6 </text> | 6 </text> |
7 </defs> | 7 </defs> |
8 <g><rect id="legendbox"/></g> | 8 <g><rect id="legendbox"/></g> |
9 <script><![CDATA[ | 9 <script><![CDATA[ |
10 document.execCommand("SelectAll"); | 10 document.execCommand("SelectAll"); |
11 elem = document.getElementById("tspan1"); | 11 elem = document.getElementById("tspan1"); |
12 elem.removeAttribute("x"); | 12 elem.removeAttribute("x"); |
13 range = document.createRange(); | 13 range = document.createRange(); |
14 range.setStartBefore(document.getElementById("tspan1")); | 14 range.setStartBefore(document.getElementById("tspan1")); |
15 range.setEndAfter(document.getElementById("legendbox")); | 15 range.setEndAfter(document.getElementById("legendbox")); |
16 range.deleteContents(); | 16 range.deleteContents(); |
17 | 17 |
18 if (window.layoutTestController) | 18 if (window.layoutTestController) |
19 layoutTestController.dumpAsText(); | 19 layoutTestController.dumpAsText(); |
20 | 20 |
21 function go() { | 21 function go() { |
22 var svgRoot = document.getElementById("svgRoot"); | 22 var svgRoot = document.getElementById("svgRoot"); |
23 var passText = document.createElementNS("http://www.w3.org/2000/svg", "tex
t"); | 23 var passText = document.createElementNS("http://www.w3.org/2000/svg", "tex
t"); |
24 var textContent = document.createTextNode("PASS"); | 24 var textContent = document.createTextNode("PASS"); |
25 passText.appendChild(textContent); | 25 passText.appendChild(textContent); |
26 svgRoot.appendChild(passText); | 26 svgRoot.appendChild(passText); |
27 } | 27 } |
28 ]]></script> | 28 ]]></script> |
29 </svg> | 29 </svg> |
OLD | NEW |