OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
3 <script src="../../resources/run-after-layout-and-paint.js"></script> | 3 <script src="../../resources/run-after-layout-and-paint.js"></script> |
4 <script> | 4 <script> |
5 window.testIsAsync = true; | 5 window.testIsAsync = true; |
6 window.onload = runRepaintTest; | 6 window.onload = runRepaintAndPixelTest; |
7 | 7 |
8 function repaintTest() { | 8 function repaintTest() { |
9 runAfterLayoutAndPaint(function() { | 9 runAfterLayoutAndPaint(function() { |
10 document.querySelector('#r').setAttribute('fill', 'green'); | 10 document.querySelector('#r').setAttribute('fill', 'green'); |
11 if (window.testRunner) | 11 if (window.testRunner) |
12 finishRepaintTest(); | 12 finishRepaintTest(); |
13 }); | 13 }); |
14 }; | 14 }; |
15 </script> | 15 </script> |
16 <style> | 16 <style> |
17 g { | 17 g { |
18 outline: 50px solid lightblue; | 18 outline: 50px solid lightblue; |
19 } | 19 } |
20 rect#r { | 20 rect#r { |
21 outline: 50px solid blue; | 21 outline: 50px solid blue; |
22 } | 22 } |
23 </style> | 23 </style> |
24 <svg width="500" height="500"> | 24 <svg width="500" height="500"> |
25 <g transform="translate(50 50)"> | 25 <g transform="translate(50 50)"> |
26 <rect width="400" height="100"/> | 26 <rect width="400" height="100"/> |
27 <rect y="300" width="400" height="100"/> | 27 <rect y="300" width="400" height="100"/> |
28 <rect id="r" x="100" y="100" width="200" height="200" fill="blue"/> | 28 <rect id="r" x="100" y="100" width="200" height="200" fill="blue"/> |
29 </g> | 29 </g> |
30 </svg> | 30 </svg> |
OLD | NEW |