| 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 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 function drawImageToCanvas() { | 35 function drawImageToCanvas() { |
| 36 var canvas = document.querySelector('canvas'); | 36 var canvas = document.querySelector('canvas'); |
| 37 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38
0); | 37 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38
0); |
| 38 | 38 |
| 39 var image = document.querySelector('img'); | 39 var image = document.querySelector('img'); |
| 40 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height); | 40 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height); |
| 41 | 41 |
| 42 if (window.testRunner) | 42 if (window.testRunner) |
| 43 window.testRunner.setColorProfile('whacked', done); | 43 window.testRunner.setColorProfile('colorSpin', done); |
| 44 } | 44 } |
| 45 | 45 |
| 46 function done() { | 46 function done() { |
| 47 setTimeout(function() { window.testRunner.notifyDone() }, 0); | 47 setTimeout(function() { window.testRunner.notifyDone() }, 0); |
| 48 } | 48 } |
| 49 | 49 |
| 50 if (window.internals) | |
| 51 internals.settings.setImageColorProfilesEnabled(true); | |
| 52 | |
| 53 if (window.testRunner) { | 50 if (window.testRunner) { |
| 54 testRunner.dumpAsTextWithPixelResults(); | 51 testRunner.dumpAsTextWithPixelResults(); |
| 55 testRunner.waitUntilDone(); | 52 testRunner.waitUntilDone(); |
| 56 } | 53 } |
| 57 </script> | 54 </script> |
| 58 </html> | 55 </html> |
| OLD | NEW |