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

Side by Side Diff: third_party/WebKit/LayoutTests/images/cmyk-jpeg-with-color-profile.html

Issue 2496663002: Merge css3/image/ and fast/images/ to images/ (Closed)
Patch Set: Address failing tests (3 of them) Created 4 years, 1 month 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 <title>Test that we can render a CMYK JPEG without color corruption.</title> 2 <title>Test that we can render a CMYK JPEG without color corruption.</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 async_test(function(t) { 6 async_test(function(t) {
7 // The colors used for verifying the test results. 7 // The colors used for verifying the test results.
8 var red = 0, green = 0, blue = 0, alpha = 0; 8 var red = 0, green = 0, blue = 0, alpha = 0;
9 // Create a canvas element. This element is used for pasting a CMYK JPEG and 9 // Create a canvas element. This element is used for pasting a CMYK JPEG and
10 // reading its pixels. 10 // reading its pixels.
11 var canvas = document.createElement("canvas"); 11 var canvas = document.createElement("canvas");
12 canvas.width = 64; 12 canvas.width = 64;
13 canvas.height = 64; 13 canvas.height = 64;
14 // Create an image object and load a CMYK JPEG. 14 // Create an image object and load a CMYK JPEG.
(...skipping 20 matching lines...) Expand all
35 35
36 // Even though the output colors depend on color-profiles (i.e. they dep end 36 // Even though the output colors depend on color-profiles (i.e. they dep end
37 // on devices), green must be the most prominent color because the sourc e 37 // on devices), green must be the most prominent color because the sourc e
38 // image only consists of green. So, we test it. 38 // image only consists of green. So, we test it.
39 assert_greater_than(green, red); 39 assert_greater_than(green, red);
40 assert_greater_than(green, blue); 40 assert_greater_than(green, blue);
41 }); 41 });
42 image.src = "resources/cmyk-jpeg.jpg"; 42 image.src = "resources/cmyk-jpeg.jpg";
43 }); 43 });
44 </script> 44 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698