Chromium Code Reviews| Index: LayoutTests/fast/canvas/canvas-toBlob-webp-maximum-quality.html |
| diff --git a/LayoutTests/fast/canvas/canvas-toBlob-webp-maximum-quality.html b/LayoutTests/fast/canvas/canvas-toBlob-webp-maximum-quality.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..faaf8912fd285fbc85c8a9805ec1a4c521b5806a |
| --- /dev/null |
| +++ b/LayoutTests/fast/canvas/canvas-toBlob-webp-maximum-quality.html |
| @@ -0,0 +1,29 @@ |
| +<canvas id="mycanvas"></canvas> |
| +<img id="result" onload="testDone()"> |
| +<script type = 'text/javascript'> |
| +if (window.testRunner) { |
| + testRunner.dumpAsTextWithPixelResults(); |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +function testDone() |
| +{ |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| +} |
| + |
| +var image = new Image(); |
| +image.onload = function() { |
| + var canvas = document.getElementById("mycanvas"); |
| + canvas.width = image.width; |
| + canvas.height = image.height; |
| + var ctx = canvas.getContext('2d'); |
| + ctx.drawImage(image, 0, 0); |
| + |
| + canvas.toBlob(function(blob) { |
| + url = URL.createObjectURL(blob); |
| + result.src = url; |
| + }, "image/webp", 1.0); |
|
Noel Gordon
2015/08/28 08:53:47
image/webp does not have the special treatment tha
|
| +} |
| +image.src = "resources/letters.png"; |
| +</script> |