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

Unified Diff: LayoutTests/fast/canvas/canvas-toBlob-webp-maximum-quality.html

Issue 1257253004: [HTMLCanvasElement.toBlob] Default callback version without scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modifications based on feedback from Patch Set 3 including Layout Tests and Rebaseline of Mac and Win Created 5 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 side-by-side diff with in-line comments
Download patch
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);
Justin Novosad 2015/08/20 20:38:43 No need to solve this now, but please log a bug fo
xlai (Olivia) 2015/08/20 21:36:29 Done. Issued Logged: https://code.google.com/p/chr
+}
+image.src = "resources/letters.png";
+</script>

Powered by Google App Engine
This is Rietveld 408576698