| <html> |
| <body> |
| This test is to ensure that we do not crash when attempting to determine the dimension properties of an SVG text element with no renderer. |
| <div id="log"><span style='color: red;'>FAIL:</span> Did not complete test</div> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| var svgns = "http://www.w3.org/2000/svg"; |
| var svg = document.createElementNS(svgns, "svg"); |
| svg.setAttribute("style", "width:100px;height:100px;display:none;"); |
| var text = document.createElementNS(svgns, "text"); |
| var textContent = document.createTextNode("text"); |
| text.getNumberOfChars(); |
| text.getComputedTextLength(); |
| text.appendChild(textContent); |
| text.getNumberOfChars(); |
| text.getComputedTextLength(); |
| svg.appendChild(text); |
| text.getNumberOfChars(); |
| text.getComputedTextLength(); |
| document.body.appendChild(svg); |
| text.getNumberOfChars(); |
| text.getComputedTextLength(); |
| document.getElementById("log").innerHTML = "<span style='color: green;'>PASS:</span> Did not crash when attempting to access SVG text dimensions."; |
| </script> |
| </body> |
| </html> |