| <!DOCTYPE html> |
| <script src="../../resources/js-test.js"></script> |
| <svg width="200" height="200" style="display: block"> |
| <rect width="0" height="100" fill="green"> |
| <animate attributeName="width" begin="0s; 1000s" to="200" dur="25ms" fill="freeze"/> |
| <animate attributeName="width" begin="50ms" to="100" dur="500s" onbegin="runTest()"/> |
| </rect> |
| </svg> |
| <script> |
| window.jsTestIsAsync = true; |
| |
| var rectWidth; |
| |
| function runTest() { |
| rect = document.querySelector('rect'); |
| rectWidth = rect.width.animVal.valueInSpecifiedUnits; |
| // Width expected to be 100 < x <= 200. |
| shouldBeGreaterThan("rectWidth", "100"); |
| shouldBeGreaterThanOrEqual("200", "rectWidth"); |
| finishJSTest(); |
| } |
| </script> |