| 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-bottom: -10px; } | 6 canvas, img { margin-bottom: -10px; } |
| 7 </style> | 7 </style> |
| 8 | 8 |
| 9 <body style="overflow: hidden"> | 9 <body style="overflow: hidden"> |
| 10 <!-- The red sector of the canvas images should be at 12 o'clock. --> | 10 <!-- The red sector of the canvas images should be at 12 o'clock. --> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 setTimeout(drawImageToCanvas, 0, document.querySelector('img')); | 30 setTimeout(drawImageToCanvas, 0, document.querySelector('img')); |
| 31 } | 31 } |
| 32 | 32 |
| 33 function drawImageToCanvas(image) { | 33 function drawImageToCanvas(image) { |
| 34 var canvas = document.querySelector('canvas'); | 34 var canvas = document.querySelector('canvas'); |
| 35 | 35 |
| 36 canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); | 36 canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); |
| 37 canvas.getContext('2d').drawImage(image, 0, 0); | 37 canvas.getContext('2d').drawImage(image, 0, 0); |
| 38 | 38 |
| 39 if (window.testRunner) | 39 if (window.testRunner) |
| 40 runAfterLayoutAndPaint(setWhackedColorProfile); | 40 setTimeout(function() { window.testRunner.notifyDone() }, 0); |
| 41 } | |
| 42 | |
| 43 function setWhackedColorProfile() { | |
| 44 window.testRunner.setColorProfile('colorSpin', done); | |
| 45 } | |
| 46 | |
| 47 function done() { | |
| 48 setTimeout(function() { window.testRunner.notifyDone() }, 0); | |
| 49 } | 41 } |
| 50 | 42 |
| 51 if (window.testRunner) { | 43 if (window.testRunner) { |
| 52 testRunner.dumpAsTextWithPixelResults(); | 44 testRunner.dumpAsTextWithPixelResults(); |
| 53 testRunner.waitUntilDone(); | 45 testRunner.waitUntilDone(); |
| 54 } | 46 } |
| 55 </script> | 47 </script> |
| 56 </html> | 48 </html> |
| OLD | NEW |