| Index: LayoutTests/fast/canvas/canvas-toBlob-webp-lossless.html
|
| diff --git a/LayoutTests/fast/canvas/canvas-toBlob-webp-lossless.html b/LayoutTests/fast/canvas/canvas-toBlob-webp-lossless.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9cadf8c21d1d3eaf316e5ccb03bbbfc295b25d85
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/canvas/canvas-toBlob-webp-lossless.html
|
| @@ -0,0 +1,39 @@
|
| +The letters in the right image should be crisp like the letters in the left image.<p>
|
| +<canvas></canvas>
|
| +<img id="result" onload="testDone()">
|
| +
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsTextWithPixelResults();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +function testDone()
|
| +{
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| +}
|
| +
|
| +var image = new Image();
|
| +image.onload = function() {
|
| + var canvas = document.querySelector('canvas');
|
| + canvas.width = image.width;
|
| + canvas.height = image.height;
|
| + canvas.getContext('2d').drawImage(image, 0, 0);
|
| +
|
| + document.body.style.zoom = 1.3;
|
| +
|
| + canvas.toBlob(function(blob) {
|
| + var failure = "../../fast/images/resources/rgb-jpeg-red.jpg";
|
| + if (!blob) {
|
| + result.src = failure;
|
| + } else if (blob.type != 'image/webp') {
|
| + result.src = failure;
|
| + } else {
|
| + result.src = URL.createObjectURL(blob);
|
| + }
|
| + }, "image/webplossless", 0.2);
|
| +};
|
| +
|
| +image.src = "resources/letters.png";
|
| +</script>
|
|
|