| <?xml version="1.0" encoding="UTF-8"?> |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()"> |
| <script xlink:href="../resources/text-based-repaint.js"></script> |
| <defs> |
| <rect id="rect" fill="green" width="50" height="50" transform="rotate(45)"> |
| <animateTransform id="animation" attributeName="transform" type="rotate" calcMode="discrete" begin="indefinite" from="45" to="0" dur="0.1s" fill="freeze"/> |
| </rect> |
| |
| <filter id="filter"> |
| <feImage xlink:href="#rect"/> |
| </filter> |
| </defs> |
| <text y="-50">Passes if rect is not rotated</text> |
| <rect fill="red" x="50" y="50" width="50" height="50" filter="url(#filter)"/> |
| |
| <script><![CDATA[ |
| // These svg files are animated automatically, so have flaky repaint rect |
| // output depending on when repaint rect capturing starts. |
| window.outputRepaintRects = false; |
| window.testIsAsync = true; |
| function repaintTest() { |
| document.getElementById("animation").beginElement(); |
| setTimeout(finishTest, 50); |
| |
| function finishTest() { |
| // Wait for the animation to finish |
| if (document.getElementById("rect").transform.animVal.getItem(0).matrix.a != 1) { |
| setTimeout(finishTest, 50); |
| return; |
| } |
| |
| finishRepaintTest(); |
| } |
| } |
| ]]></script> |
| </svg> |