Chromium Code Reviews| Index: LayoutTests/svg/animations/animation-begin-change-js.html |
| diff --git a/LayoutTests/svg/animations/animation-begin-change-js.html b/LayoutTests/svg/animations/animation-begin-change-js.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..02a0ce26b47dc292053a2db30fe58b738cbe3b28 |
| --- /dev/null |
| +++ b/LayoutTests/svg/animations/animation-begin-change-js.html |
| @@ -0,0 +1,47 @@ |
| +<!DOCTYPE html> |
| +<svg> |
| + <rect id="rect" x="0" width="100px" height="100px" fill='orange'> |
|
fs
2015/05/11 15:41:53
x="0" and fill='orange' doesn't appear to be neede
Shanmuga Pandi
2015/05/12 09:43:13
Done.
|
| + <animate id="anim" |
|
fs
2015/05/11 15:41:53
Can you use a <set> instead?
Shanmuga Pandi
2015/05/12 09:43:14
Done.
|
| + begin="infinite" |
|
fs
2015/05/11 15:41:53
indefinite?
Shanmuga Pandi
2015/05/12 09:43:14
Acknowledged.
|
| + dur="2s" |
| + attributeName="x" |
| + to="50" |
| + fill="freeze"/> |
| + </rect> |
| + <text y="150" x="20" id="console"/> |
|
fs
2015/05/11 15:41:53
Looks unnecessary.
Shanmuga Pandi
2015/05/12 09:43:14
Done.
|
| +</svg> |
| +<script> |
| + document.getElementById("anim").setAttribute("begin","rect.click"); |
| + setTimeout(Test, 0); |
| + function Test() { |
|
fs
2015/05/11 15:41:53
Could just use an anonymous function() directly in
Shanmuga Pandi
2015/05/12 09:43:14
Done.
|
| + if (window.eventSender) { |
| + eventSender.mouseMoveTo(50, 50); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| + } |
| + |
| + if (window.testRunner) { |
| + testRunner.displayAsyncThen(function() { |
|
fs
2015/05/11 15:41:53
Ought to be possible to run this on the 'begin' ev
Shanmuga Pandi
2015/05/12 09:43:13
begin event will not be triggered with out this pa
|
| + dumpResult(); |
| + }); |
| + } |
| + } |
| + |
| + function dumpResult() |
| + { |
| + var console = document.getElementById("console"); |
| + var x = document.getElementById("rect").getAttribute("x"); |
| + if (x == 0) |
| + console.appendChild(document.createTextNode("Failed (x was not animated)")); |
| + else |
| + console.appendChild(document.createTextNode("Passed")); |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + } |
| + |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| + } |
| + |
| +</script> |