From e9a52d6df0dcb092adc4f36b58484132fbff51c0 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 29 Oct 2010 14:47:39 -0700 Subject: [PATCH] Added quadraticCurveTo() test --- test/canvas.test.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/canvas.test.js b/test/canvas.test.js index 85062c1..89dbf3a 100644 --- a/test/canvas.test.js +++ b/test/canvas.test.js @@ -194,6 +194,28 @@ module.exports = { , 'Context2d#bezierCurveTo() failed'); }, + 'test Context2d#quadraticCurveTo()': function(assert){ + var canvas = new Canvas(200, 200) + , ctx = canvas.getContext('2d') + , path = __dirname + '/images/quadraticCurveTo.png'; + + ctx.beginPath(); + ctx.moveTo(75,25); + ctx.quadraticCurveTo(25,25,25,62.5); + ctx.quadraticCurveTo(25,100,50,100); + ctx.quadraticCurveTo(50,120,30,125); + ctx.quadraticCurveTo(60,120,65,100); + ctx.quadraticCurveTo(125,100,125,62.5); + ctx.quadraticCurveTo(125,25,75,25); + ctx.stroke(); + + assertChecksum( + canvas + , path + , '4995ce059b78d8b78652d9f6d2d1a6f2' + , 'Context2d#quadraticCurveTo() failed'); + }, + 'test Context2d#rotate()': function(assert){ var canvas = new Canvas(200, 200) , ctx = canvas.getContext('2d')