| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <style> |
| 4 body { |
| 5 background: black; |
| 6 } |
| 7 </style> |
| 8 <body> |
| 9 This test checks if the color bleeds due to interpolation filter when the canvas
is stretched. We expect to see a white band extending from left to right withou
t any vertical black lines. |
| 10 <canvas id='foo' width='100' height='100' style='width:500px;height:100px'> </ca
nvas> |
| 11 <script> |
| 12 |
| 13 if (window.testRunner) { |
| 14 testRunner.waitUntilDone(); |
| 15 } |
| 16 |
| 17 var i = 0; |
| 18 var ctx = document.getElementById("foo").getContext("2d"); |
| 19 ctx.fillStyle = 'white'; |
| 20 |
| 21 function draw_slice() { |
| 22 if (i >= 100) { |
| 23 if (window.testRunner) { |
| 24 testRunner.notifyDone(); |
| 25 } |
| 26 } |
| 27 ctx.fillRect(i, 0, 2, 100); |
| 28 i+=2; |
| 29 window.requestAnimationFrame(draw_slice); |
| 30 } |
| 31 |
| 32 draw_slice(); |
| 33 </script> |
| 34 </body> |
| 35 </head> |
| OLD | NEW |