From 902d25b9c96062aae875ea62f27397b5aebef5f3 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Mon, 8 Nov 2010 11:19:41 -0800 Subject: [PATCH] Added failing text shadow test --- test/public/tests.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/public/tests.js b/test/public/tests.js index c93ffc7..fa65290 100644 --- a/test/public/tests.js +++ b/test/public/tests.js @@ -1083,7 +1083,7 @@ tests['shadowBlur values'] = function(ctx){ ctx.fillRect(150,150,20,20); }; -tests['shadowBlur strokeRect()'] = function(ctx){ +tests['shadow strokeRect()'] = function(ctx){ ctx.strokeRect(150,10,20,20); ctx.lineTo(20,5); @@ -1111,7 +1111,7 @@ tests['shadowBlur strokeRect()'] = function(ctx){ ctx.strokeRect(150,150,20,20); }; -tests['shadowBlur fill()'] = function(ctx){ +tests['shadow fill()'] = function(ctx){ ctx.strokeRect(150,10,20,20); ctx.lineTo(20,5); @@ -1140,7 +1140,7 @@ tests['shadowBlur fill()'] = function(ctx){ ctx.strokeRect(150,150,20,20); }; -tests['shadowBlur stroke()'] = function(ctx){ +tests['shadow stroke()'] = function(ctx){ ctx.strokeRect(150,10,20,20); ctx.lineTo(20,5); @@ -1169,7 +1169,7 @@ tests['shadowBlur stroke()'] = function(ctx){ ctx.strokeRect(150,150,20,20); }; -tests['shadowBlur globalAlpha'] = function(ctx){ +tests['shadow globalAlpha'] = function(ctx){ ctx.lineTo(0,0); ctx.lineTo(50,0); ctx.lineTo(50,150); @@ -1185,3 +1185,13 @@ tests['shadowBlur globalAlpha'] = function(ctx){ ctx.lineTo(0,150); ctx.stroke(); }; + +tests['shadow text'] = function(ctx){ + ctx.shadowColor = '#00c'; + ctx.shadowBlur = 2; + ctx.shadowOffsetX = 8; + ctx.shadowOffsetY = 8; + ctx.textAlign = 'center'; + ctx.font = '20px Arial'; + ctx.fillText("Shadow", 100, 100); +};