| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <script src="../resources/run-after-layout-and-paint.js"></script> | 3 <script src="../resources/run-after-layout-and-paint.js"></script> |
| 4 | 4 |
| 5 <style> | 5 <style> |
| 6 canvas, img { margin: 5px; width: 380px } | 6 canvas, img { margin: 5px; width: 380px } |
| 7 </style> | 7 </style> |
| 8 | 8 |
| 9 <body style="overflow: hidden"> | 9 <body style="overflow: hidden"> |
| 10 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. --> | 10 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. --> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 function drawImageToCanvas() { | 27 function drawImageToCanvas() { |
| 28 var canvas = document.querySelector('canvas'); | 28 var canvas = document.querySelector('canvas'); |
| 29 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38
0); | 29 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38
0); |
| 30 | 30 |
| 31 var image = document.querySelector('img'); | 31 var image = document.querySelector('img'); |
| 32 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height); | 32 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height); |
| 33 | 33 |
| 34 if (window.testRunner) | 34 if (window.testRunner) |
| 35 window.testRunner.setColorProfile('colorSpin', done); | 35 setTimeout(function() { window.testRunner.notifyDone() }, 0); |
| 36 } | |
| 37 | |
| 38 function done() { | |
| 39 setTimeout(function() { window.testRunner.notifyDone() }, 0); | |
| 40 } | 36 } |
| 41 | 37 |
| 42 if (window.testRunner) { | 38 if (window.testRunner) { |
| 43 testRunner.dumpAsTextWithPixelResults(); | 39 testRunner.dumpAsTextWithPixelResults(); |
| 44 testRunner.waitUntilDone(); | 40 testRunner.waitUntilDone(); |
| 45 } | 41 } |
| 46 </script> | 42 </script> |
| 47 </html> | 43 </html> |
| OLD | NEW |