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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js

Issue 1375573002: Make the canvas in race layout test smaller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/MSANExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js
index 8c94c048e8baa5a317a4d7a1b26505d57e0568dd..856d1a1f862c7406e9616954629b6dc2d625458d 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js
+++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js
@@ -12,16 +12,16 @@ var canvasCtxs = [];
var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#EE21AF";
-ctx.fillRect(0, 0, 2500, 1750);
+ctx.fillRect(0, 0, 250, 150);
function testIfAllImagesAreCorrect()
{
// All resultant images should be the same as both async and main threads use the same image encoder
var imageMatched = true;
- var firstImageData = canvasCtxs[0].getImageData(0, 0, 2500, 1750).data;
+ var firstImageData = canvasCtxs[0].getImageData(0, 0, 250, 150).data;
for (var i = 1; i < (numToBlobCalls + numToDataURLCalls); i++)
{
- var nextImageData = canvasCtxs[i].getImageData(0, 0, 2500, 1750).data;
+ var nextImageData = canvasCtxs[i].getImageData(0, 0, 250, 150).data;
for (var k = 0; k < firstImageData.length; k++)
{
if (firstImageData[k]!=nextImageData[k])
@@ -58,7 +58,7 @@ function createTestCase(i)
var newImg = new Image();
newImg.onload = function() {
- ctx_test.drawImage(newImg, 0, 0, 2500, 1750);
+ ctx_test.drawImage(newImg, 0, 0, 250, 150);
onCanvasDrawCompleted(ctx_test);
}
testImages[i] = newImg;
« no previous file with comments | « third_party/WebKit/LayoutTests/MSANExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698