commit-queue@webkit.org | ffa063e | 2011-04-27 01:28:10 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8" standalone="no"?> |
| 2 | <svg xmlns='http://www.w3.org/2000/svg'> |
| 3 | <circle cx='0' cy='50' r='20' fill='orange' id='testCircle'> |
| 4 | <animate attributeName='cx' attributeType='XML' begin='indefinite' end='indefinite' dur='10s' repeatCount='indefinite' from="10" to="200" id='dTripper' fill="freeze"/> |
| 5 | </circle> |
| 6 | <text y="130" x="20">This test verifies the animation behaviour of beginElement in SVG. See <a href="https://bugs.webkit.org/show_bug.cgi?id=26019">bug 26019</a></text> |
| 7 | <text y="150" x="20" id="console"/> |
| 8 | <script><![CDATA[ |
| 9 | var animatedElement; |
| 10 | animatedElement = document.getElementById("dTripper"); |
| 11 | animatedElement.setAttribute("to", 420); |
| 12 | animatedElement.beginElement(); |
| 13 | setTimeout(beginElement, 0); |
| 14 | |
| 15 | function beginElement() |
| 16 | { |
| 17 | animatedElement.setAttribute("to", 420); |
| 18 | animatedElement.beginElement(); |
| 19 | setTimeout(dumpResult, 0); |
| 20 | } |
| 21 | |
| 22 | function dumpResult() |
| 23 | { |
| 24 | var console = document.getElementById("console"); |
| 25 | var cx = document.getElementById("testCircle").getAttribute("cx"); |
| 26 | if (cx === 0) |
| 27 | console.appendChild(document.createTextNode("Failed (cx was not animated)")); |
| 28 | else |
| 29 | console.appendChild(document.createTextNode("Passed")); |
fmalita@chromium.org | 4988a3e | 2012-08-01 23:05:16 +0000 | [diff] [blame] | 30 | if (window.testRunner) |
| 31 | testRunner.notifyDone(); |
commit-queue@webkit.org | ffa063e | 2011-04-27 01:28:10 +0000 | [diff] [blame] | 32 | } |
| 33 | |
fmalita@chromium.org | 4988a3e | 2012-08-01 23:05:16 +0000 | [diff] [blame] | 34 | if (window.testRunner) { |
| 35 | testRunner.dumpAsText(); |
| 36 | testRunner.waitUntilDone(); |
commit-queue@webkit.org | ffa063e | 2011-04-27 01:28:10 +0000 | [diff] [blame] | 37 | } |
| 38 | ]]></script> |
| 39 | </svg> |