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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/color-profile-image-canvas-svg.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 <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-bottom: -10px; } 6 canvas, img { margin-bottom: -10px; }
7 </style> 7 </style>
8 8
9 <body style="overflow: hidden"> 9 <body style="overflow: hidden">
10 <!-- The red sector of the canvas images should be at 12 o'clock. --> 10 <!-- The red sector of the canvas images should be at 12 o'clock. -->
(...skipping 27 matching lines...) Expand all
38 var canvas = document.querySelector('canvas'); 38 var canvas = document.querySelector('canvas');
39 39
40 canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); 40 canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height);
41 canvas.getContext('2d').drawImage(image, 0, 0); 41 canvas.getContext('2d').drawImage(image, 0, 0);
42 42
43 if (window.testRunner) 43 if (window.testRunner)
44 runAfterLayoutAndPaint(setWhackedColorProfile); 44 runAfterLayoutAndPaint(setWhackedColorProfile);
45 } 45 }
46 46
47 function setWhackedColorProfile() { 47 function setWhackedColorProfile() {
48 window.testRunner.setColorProfile('whacked', done); 48 window.testRunner.setColorProfile('colorSpin', done);
49 } 49 }
50 50
51 function done() { 51 function done() {
52 setTimeout(function() { window.testRunner.notifyDone() }, 0); 52 setTimeout(function() { window.testRunner.notifyDone() }, 0);
53 } 53 }
54 54
55 if (window.internals)
56 internals.settings.setImageColorProfilesEnabled(true);
57
58 if (window.testRunner) { 55 if (window.testRunner) {
59 testRunner.dumpAsTextWithPixelResults(); 56 testRunner.dumpAsTextWithPixelResults();
60 testRunner.waitUntilDone(); 57 testRunner.waitUntilDone();
61 } 58 }
62 </script> 59 </script>
63 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698