| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <script src="../../resources/run-after-layout-and-paint.js"/></script> |
| 4 |
| 5 <style> |
| 6 div { height: 55px; overflow: hidden; } |
| 7 img { width: 250px; } |
| 8 </style> |
| 9 |
| 10 <body> |
| 11 <!-- The blue sector of the images should be at 12 o'clock. --> |
| 12 <div> |
| 13 <img src="resources/red-at-12-oclock-with-color-profile.jpg"> |
| 14 <img src="resources/red-at-12-oclock-with-color-profile.jpg"> |
| 15 <img src="resources/red-at-12-oclock-with-color-profile.jpg"> |
| 16 </div> |
| 17 <div id="test" style="position: relative; top: 1200px; margin-bottom: 300px"> |
| 18 <img src="resources/webp-color-profile-lossy.webp"> |
| 19 <img src="resources/red-at-12-oclock-with-color-profile.jpg"> |
| 20 <img src="resources/red-at-12-oclock-with-color-profile.png"> |
| 21 <div> |
| 22 </body> |
| 23 |
| 24 <script> |
| 25 window.onload = function() { |
| 26 runAfterLayoutAndPaint(window.testRunner ? changeColorProfile : scroll); |
| 27 }; |
| 28 |
| 29 function changeColorProfile() { |
| 30 setTimeout(function() { testRunner.setColorProfile('test', scroll) }, 100); |
| 31 } |
| 32 |
| 33 function scroll() { |
| 34 window.addEventListener("scroll", function() { |
| 35 if (window.testRunner) |
| 36 setTimeout(function() { testRunner.notifyDone() }, 0); |
| 37 }); |
| 38 |
| 39 test.scrollIntoView(); |
| 40 } |
| 41 |
| 42 if (window.internals) |
| 43 internals.settings.setImageColorProfilesEnabled(true); |
| 44 |
| 45 if (window.testRunner) { |
| 46 testRunner.dumpAsTextWithPixelResults(); |
| 47 testRunner.waitUntilDone(); |
| 48 } |
| 49 </script> |
| 50 </html> |
| OLD | NEW |