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

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

Issue 2936163002: Re-enable media query API test (Closed)
Patch Set: Just API 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 <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: 5px; width: 380px } 6 canvas, img { margin: 5px; width: 380px }
7 </style> 7 </style>
8 8
9 <body style="overflow: hidden"> 9 <body style="overflow: hidden">
10 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. --> 10 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. -->
(...skipping 14 matching lines...) Expand all
25 }; 25 };
26 26
27 function drawImageToCanvas() { 27 function drawImageToCanvas() {
28 var canvas = document.querySelector('canvas'); 28 var canvas = document.querySelector('canvas');
29 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38 0); 29 canvas.getContext('2d').clearRect(0, 0, canvas.width = 380, canvas.height = 38 0);
30 30
31 var image = document.querySelector('img'); 31 var image = document.querySelector('img');
32 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height); 32 canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height);
33 33
34 if (window.testRunner) 34 if (window.testRunner)
35 window.testRunner.setColorProfile('colorSpin', done); 35 setTimeout(function() { window.testRunner.notifyDone() }, 0);
36 }
37
38 function done() {
39 setTimeout(function() { window.testRunner.notifyDone() }, 0);
40 } 36 }
41 37
42 if (window.testRunner) { 38 if (window.testRunner) {
43 testRunner.dumpAsTextWithPixelResults(); 39 testRunner.dumpAsTextWithPixelResults();
44 testRunner.waitUntilDone(); 40 testRunner.waitUntilDone();
45 } 41 }
46 </script> 42 </script>
47 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698