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

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

Issue 2938543003: Remove almost all Javascript calls to setColorProfile (Closed)
Patch Set: Created 3 years, 6 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('colorSpin', done) }, 200 ); 27 setTimeout(function() { testRunner.notifyDone() }, 0);
28 }
29
30 function done() {
31 setTimeout(function() { testRunner.notifyDone() }, 0);
32 } 28 }
33 29
34 if (window.testRunner) { 30 if (window.testRunner) {
35 testRunner.dumpAsTextWithPixelResults(); 31 testRunner.dumpAsTextWithPixelResults();
36 testRunner.waitUntilDone(); 32 testRunner.waitUntilDone();
37 } 33 }
38 </script> 34 </script>
39 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698