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

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

Issue 2246303003: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify test as per the comments. 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 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
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