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

Side by Side Diff: LayoutTests/fast/canvas/canvas-toBlob-webp-lossless.html

Issue 1302423004: Support lossy and lossless <canvas>.toDataURL for webp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing. Created 5 years, 3 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/canvas/canvas-toDataURL-webp.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!-- The letters in the right image should be crisp like the letters in the left image. -->
2 <canvas></canvas>
3 <img id="result" onload="testDone()">
4
5 <script>
6 if (window.testRunner) {
7 testRunner.dumpAsTextWithPixelResults();
8 testRunner.waitUntilDone();
9 }
10
11 function testDone()
12 {
13 if (window.testRunner)
14 testRunner.notifyDone();
15 }
16
17 var image = new Image();
18 image.onload = function() {
19 var canvas = document.querySelector('canvas');
20 canvas.width = image.width;
21 canvas.height = image.height;
22 canvas.getContext('2d').drawImage(image, 0, 0);
23
24 document.body.style.zoom = 1.3;
25
26 canvas.toBlob(function(blob) {
27 var failure = "../../fast/images/resources/rgb-jpeg-red.jpg";
28 if (!blob) {
29 result.src = failure;
30 } else if (blob.type != 'image/webp') {
31 result.src = failure;
32 } else {
33 result.src = URL.createObjectURL(blob);
34 }
35 }, "image/webp.ll", 0.2);
36 };
37
38 image.src = "resources/letters.png";
39 </script>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/canvas/canvas-toDataURL-webp.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698