| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <canvas></canvas> | 2 <canvas></canvas> |
| 3 <script> | 3 <script> |
| 4 | 4 |
| 5 if (window.testRunner) | 5 if (window.testRunner) |
| 6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
| 7 | 7 |
| 8 var canvas = document.querySelector("canvas"); | 8 var canvas = document.querySelector("canvas"); |
| 9 var context = canvas.getContext("2d"); | 9 var context = canvas.getContext("2d"); |
| 10 | 10 |
| 11 // first frame | 11 // first frame |
| 12 | 12 |
| 13 requestAnimationFrame(function() { | 13 requestAnimationFrame(function() { |
| 14 | 14 |
| 15 // second frame which doesn't have a dirty | 15 // second frame which doesn't have a dirty |
| 16 context.scale(2, 1); | 16 context.scale(2, 1); |
| 17 | 17 |
| 18 requestAnimationFrame(function() { | 18 requestAnimationFrame(function() { |
| 19 | 19 |
| 20 // third frame which has a dirty | 20 // third frame which has a dirty |
| 21 context.scale(2, 1); | 21 context.scale(2, 1); |
| 22 context.fillRect(0, 0, 10, 10); | 22 context.fillRect(0, 0, 10, 10); |
| 23 | 23 |
| 24 if (window.testRunner) | 24 if (window.testRunner) |
| 25 testRunner.notifyDone(); | 25 testRunner.layoutAndPaintAsyncThen(function(){ testRunner.notifyDone(); })
; |
| 26 | 26 |
| 27 }); | 27 }); |
| 28 }); | 28 }); |
| 29 | 29 |
| 30 </script> | 30 </script> |
| OLD | NEW |