Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <svg> | |
| 3 <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.
| |
| 4 <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.
| |
| 5 begin="infinite" | |
|
fs
2015/05/11 15:41:53
indefinite?
Shanmuga Pandi
2015/05/12 09:43:14
Acknowledged.
| |
| 6 dur="2s" | |
| 7 attributeName="x" | |
| 8 to="50" | |
| 9 fill="freeze"/> | |
| 10 </rect> | |
| 11 <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.
| |
| 12 </svg> | |
| 13 <script> | |
| 14 document.getElementById("anim").setAttribute("begin","rect.click"); | |
| 15 setTimeout(Test, 0); | |
| 16 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.
| |
| 17 if (window.eventSender) { | |
| 18 eventSender.mouseMoveTo(50, 50); | |
| 19 eventSender.mouseDown(); | |
| 20 eventSender.mouseUp(); | |
| 21 } | |
| 22 | |
| 23 if (window.testRunner) { | |
| 24 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
| |
| 25 dumpResult(); | |
| 26 }); | |
| 27 } | |
| 28 } | |
| 29 | |
| 30 function dumpResult() | |
| 31 { | |
| 32 var console = document.getElementById("console"); | |
| 33 var x = document.getElementById("rect").getAttribute("x"); | |
| 34 if (x == 0) | |
| 35 console.appendChild(document.createTextNode("Failed (x was not anima ted)")); | |
| 36 else | |
| 37 console.appendChild(document.createTextNode("Passed")); | |
| 38 if (window.testRunner) | |
| 39 testRunner.notifyDone(); | |
| 40 } | |
| 41 | |
| 42 if (window.testRunner) { | |
| 43 testRunner.dumpAsText(); | |
| 44 testRunner.waitUntilDone(); | |
| 45 } | |
| 46 | |
| 47 </script> | |
| OLD | NEW |