| <?xml version="1.0" standalone="no"?> |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="800" height="600"> |
| <symbol> |
| <g id="g0"> |
| <rect width="50" height="100" fill="green" /> |
| </g> |
| </symbol> |
| <text id="console" x="10" y="20" /> |
| <script><![CDATA[ |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function runTest() |
| { |
| var bbox = document.getElementById("g0").getBBox(); |
| var console = document.getElementById("console"); |
| if (bbox.width == 50 && bbox.height == 100) { |
| console.setAttribute("fill", "green"); |
| console.appendChild(document.createTextNode("PASS: Right width and height of bbox of rect within symbol.")); |
| } else { |
| console.setAttribute("fill", "red"); |
| console.appendChild(document.createTextNode("FAIL: Wrong width and/or height of bbox of rect within symbol.")); |
| } |
| } |
| |
| window.onload = runTest(); |
| ]]></script> |
| </svg> |