Browse Source

Added failing measureText() test

v1.x
Tj Holowaychuk 13 years ago
parent
commit
85fd07913b
  1. 9
      test/canvas.test.js

9
test/canvas.test.js

@ -363,6 +363,15 @@ module.exports = {
assert.equal(0, imageData.data[3]);
},
'test Context2d#measureText().width': function(){
var canvas = new Canvas(20, 20)
, ctx = canvas.getContext('2d');
assert.ok(ctx.measureText('foo').width);
assert.ok(ctx.measureText('foo').width != ctx.measureText('foobar').width);
assert.ok(ctx.measureText('foo').width != ctx.measureText('foo ').width);
},
'test Context2d#createImageData(ImageData)': function(){
var canvas = new Canvas(20, 20)
, ctx = canvas.getContext('2d');

Loading…
Cancel
Save