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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/color-profile-layer-filter.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 <style> 3 <style>
4 img { 4 img {
5 transform: translateZ(0); /* Enable direct compositing. */ 5 transform: translateZ(0); /* Enable direct compositing. */
6 width: 250px; 6 width: 250px;
7 } 7 }
8 .filter { 8 .filter {
9 -webkit-filter: blur(3px); 9 -webkit-filter: blur(3px);
10 } 10 }
11 </style> 11 </style>
12 12
13 <body> 13 <body>
14 <!-- The blue sector of the images should be at 12 o'clock. --> 14 <!-- The blue sector of the images should be at 12 o'clock. -->
15 <img onload="load(this)" title="png image" src="resources/red-at-12-oclock-wi th-color-profile.png"> 15 <img onload="load(this)" title="png image" src="resources/red-at-12-oclock-wi th-color-profile.png">
16 <img onload="load(this)" title="jpeg image" src="resources/red-at-12-oclock-wi th-color-profile.jpg"> 16 <img onload="load(this)" title="jpeg image" src="resources/red-at-12-oclock-wi th-color-profile.jpg">
17 <img onload="load(this)" title="webp image" src="resources/webp-color-profile- lossy.webp"> 17 <img onload="load(this)" title="webp image" src="resources/webp-color-profile- lossy.webp">
18 </body> 18 </body>
19 19
20 <script> 20 <script>
21 var images = 0; 21 var images = 0;
22 22
23 function load(element) { 23 function load(element) {
24 setTimeout(function() { element.classList.add('filter') || next() }, 100); 24 setTimeout(function() { element.classList.add('filter') || next() }, 100);
25 } 25 }
26 26
27 function next() { 27 function next() {
28 if (++images == 3 && window.testRunner) 28 if (++images == 3 && window.testRunner)
29 setTimeout(function() { testRunner.setColorProfile('whacked', profileChanged ) }, 100); 29 setTimeout(function() { testRunner.setColorProfile('colorSpin', profileChang ed) }, 100);
30 } 30 }
31 31
32 function profileChanged() { 32 function profileChanged() {
33 setTimeout(function() { testRunner.notifyDone() }, 0); 33 setTimeout(function() { testRunner.notifyDone() }, 0);
34 } 34 }
35 35
36 if (window.internals)
37 internals.settings.setImageColorProfilesEnabled(true);
38
39 if (window.testRunner) { 36 if (window.testRunner) {
40 window.testRunner.dumpAsTextWithPixelResults(); 37 window.testRunner.dumpAsTextWithPixelResults();
41 window.testRunner.waitUntilDone(); 38 window.testRunner.waitUntilDone();
42 } 39 }
43 </script> 40 </script>
44 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698