Browse Source

Fixed fillStyle test

v1.x
Tj Holowaychuk 14 years ago
parent
commit
8917de8d5c
  1. 14
      test/canvas.test.js

14
test/canvas.test.js

@ -232,23 +232,23 @@ module.exports = {
var canvas = new Canvas(200, 200) var canvas = new Canvas(200, 200)
, ctx = canvas.getContext('2d') , ctx = canvas.getContext('2d')
, path = __dirname + '/images/fillStyle.png'; , path = __dirname + '/images/fillStyle.png';
ctx.fillStyle = '#000';
ctx.fillRect(110, 110, 50, 50);
assert.equal('rgba(0,0,0,1)', ctx.fillStyle);
ctx.fillStyle = 'rgb(0,55,0)'; ctx.fillStyle = 'rgb(0,55,0)';
ctx.fillRect(10, 10, 50, 50); ctx.fillRect(10, 10, 50, 50);
assert.equal('rgba(0,55,0,1)', ctx.fillStyle); assert.equal('rgba(0,55,0,1)', ctx.fillStyle);
ctx.fillStyle = 'rgba(0,0,0,0.5)'; ctx.fillStyle = 'rgba(0,0,0,0.1)';
ctx.fillRect(60, 60, 50, 50); ctx.fillRect(60, 60, 50, 50);
assert.equal('rgba(0,0,0,0.5)', ctx.fillStyle); assert.equal('rgba(0,0,0,0.1)', ctx.fillStyle);
ctx.fillStyle = '#000';
ctx.fillRect(110, 110, 50, 50);
assert.equal('rgba(0,0,0,1)', ctx.fillStyle);
assertChecksum( assertChecksum(
canvas canvas
, path , path
, '01632d060ba4702a53862a955382d30d' , '804d2494db2eeda204ccbd6d0b48265a'
, 'Context2d#fillStyle= failed'); , 'Context2d#fillStyle= failed');
}, },

Loading…
Cancel
Save