OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 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"); |
(...skipping 23 matching lines...) Expand all Loading... |
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> |
OLD | NEW |