chromium/third_party/blink/web_tests/fast/canvas/canvas-toBlob-jpeg-medium-quality.html

<canvas id="mycanvas"></canvas>
<meta name=fuzzy content="maxDifference=0-1; totalPixels=0-20000">
<img id="result" onload="testDone()">
<script type = 'text/javascript'>
if (window.testRunner)
    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/jpeg", 0.2);
}
image.src = "resources/letters.png";
</script>