OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <svg width="100" height="100"> | 2 <svg width="100" height="100"> |
3 <rect id="ref" x="20" y="30" width="10" height="10" fill="red"></rect> | 3 <rect id="ref" x="20" y="30" width="10" height="10" fill="red"></rect> |
4 <rect id="move" x="10" y="10" width="10" height="10" fill="green"></rect> | 4 <rect id="move" x="10" y="10" width="10" height="10" fill="green"></rect> |
5 </svg> | 5 </svg> |
6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
7 <script> | 7 <script> |
8 testIsAsync = true; | 8 testIsAsync = true; |
9 window.onload = runRepaintTest; | 9 window.onload = runRepaintAndPixelTest; |
10 | 10 |
11 function repaintTest() { | 11 function repaintTest() { |
12 var transform = document.querySelector('svg').createSVGTransform(); | 12 var transform = document.querySelector('svg').createSVGTransform(); |
13 transform.matrix.e = 10; | 13 transform.matrix.e = 10; |
14 document.querySelector('#move').transform.baseVal.appendItem(transform); | 14 document.querySelector('#move').transform.baseVal.appendItem(transform); |
15 | 15 |
16 requestAnimationFrame(function() { | 16 requestAnimationFrame(function() { |
17 transform.matrix.f = 20; | 17 transform.matrix.f = 20; |
18 if (window.testRunner) | 18 if (window.testRunner) |
19 finishRepaintTest(); | 19 finishRepaintTest(); |
20 }); | 20 }); |
21 } | 21 } |
22 </script> | 22 </script> |
OLD | NEW |