Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/color-profile-image-object-fit.html

Issue 2217463003: Color profile layout test cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 3
4 <style> 4 <style>
5 .test { 5 .test {
6 object-fit: contain; 6 object-fit: contain;
7 } 7 }
8 8
9 img { 9 img {
10 border: 2px solid black; 10 border: 2px solid black;
11 height: 200px; 11 height: 200px;
12 width: 250px; 12 width: 250px;
13 } 13 }
14 </style> 14 </style>
15 15
16 <body> 16 <body>
17 <!-- The blue sector of the images should be at 12 o'clock. --> 17 <!-- The blue sector of the images should be at 12 o'clock. -->
18 <img class="test" title="png image" onload="load()" src="resources/red-at-12-o clock-with-color-profile.png"> 18 <img class="test" title="png image" onload="load()" src="resources/red-at-12-o clock-with-color-profile.png">
19 <img class="test" title="jpg image" onload="load()" src="resources/red-at-12-o clock-with-color-profile.jpg"> 19 <img class="test" title="jpg image" onload="load()" src="resources/red-at-12-o clock-with-color-profile.jpg">
20 </body> 20 </body>
21 21
22 <script> 22 <script>
23 var images = 0; 23 var images = 0;
24 24
25 function load() { 25 function load() {
26 if (++images == 2 && window.testRunner) 26 if (++images == 2 && window.testRunner)
27 setTimeout(function() { testRunner.setColorProfile('whacked', done) }, 200); 27 setTimeout(function() { testRunner.setColorProfile('colorSpin', done) }, 200 );
28 } 28 }
29 29
30 function done() { 30 function done() {
31 setTimeout(function() { testRunner.notifyDone() }, 0); 31 setTimeout(function() { testRunner.notifyDone() }, 0);
32 } 32 }
33 33
34 if (window.internals)
35 internals.settings.setImageColorProfilesEnabled(true);
36
37 if (window.testRunner) { 34 if (window.testRunner) {
38 testRunner.dumpAsTextWithPixelResults(); 35 testRunner.dumpAsTextWithPixelResults();
39 testRunner.waitUntilDone(); 36 testRunner.waitUntilDone();
40 } 37 }
41 </script> 38 </script>
42 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698