summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas
diff options
context:
space:
mode:
authornolan.robin.cao <nolan.robin.cao@gmail.com>2016-01-18 18:39:50 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-19 02:41:03 +0000
commit7ef3a3a242885e3ba1bbc9501ea80f20354bca44 (patch)
tree802eac4eb4a50ee140f017b5d6ae31c73bb62967 /third_party/WebKit/LayoutTests/fast/canvas
parenta322e76d9696b496aebc6d50e8f4e7009efb77e0 (diff)
downloadchromium_src-7ef3a3a242885e3ba1bbc9501ea80f20354bca44.zip
chromium_src-7ef3a3a242885e3ba1bbc9501ea80f20354bca44.tar.gz
chromium_src-7ef3a3a242885e3ba1bbc9501ea80f20354bca44.tar.bz2
Fix errors in fast/canvas/toBlob/canvas-toBlob-defaultpng.html
The dw and dh parameters passed to drawImage should be 300x150, which is the default size of canvas elment. Otherwise, the image will be scaled when drawing. This is why the test fails. BUG=577687 Review URL: https://codereview.chromium.org/1600603002 Cr-Commit-Position: refs/heads/master@{#370070}
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/canvas')
-rw-r--r--third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html b/third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html
index 6f09ee8..c2fec4c 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html
@@ -16,10 +16,11 @@ var ctx2 = canvas2.getContext("2d");
var newImg = new Image();
newImg.onload = function() {
- ctx2.drawImage(newImg, 0, 0, 150, 75);
+ // 300x150 is the default size of the canvas, which is the source of the newImg.
+ ctx2.drawImage(newImg, 0, 0, 300, 150);
var imageData1 = ctx.getImageData(0, 0, 150, 75).data;
- var imageData2 = ctx.getImageData(0, 0, 150, 75).data;
+ var imageData2 = ctx2.getImageData(0, 0, 150, 75).data;
var imageMatched = true;
for (var i = 1; i < imageData1.length; i++)
{