| <!DOCTYPE html> |
| <html> |
| <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=82629 --> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function runTest() { |
| var path = document.getElementById('path'); |
| path.setAttribute('d', "M80 80L100 100"); |
| |
| // The bounding box should be updated. |
| var box = path.getBBox(); |
| var pass = (box.x == 80) && (box.y == 80) && (box.width == 20) && (box.height == 20); |
| document.getElementById('output').innerHTML = (pass ? 'PASS' : 'FAIL') + ': bounding box is (' |
| + box.x + ', ' + box.y + ', ' + (box.x + box.width) + ', ' + (box.y + box.height) + ')'; |
| |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| </script> |
| </head> |
| <body> |
| <div id="output"></div> |
| <svg xmlns="http://www.w3.org/2000/svg" onload="runTest()"> |
| <path id="path" d="M30 30 L50 50" stroke-width="3" stroke="green"></path> |
| </svg> |
| </body> |
| </html> |
| |