Browse Source

Added toDataURL() test for other formats

v1.x
Tj Holowaychuk 14 years ago
parent
commit
92c57a0f24
  1. 9
      test/canvas.test.js

9
test/canvas.test.js

@ -570,6 +570,15 @@ module.exports = {
+ 'AAABJRU5ErkJggg==';
assert.equal(str, canvas.toDataURL(), 'Canvas#toDataURL() failed');
assert.equal(str, canvas.toDataURL('image/png'), 'Canvas#toDataURL() failed');
var err;
try {
canvas.toDataURL('image/jpeg');
} catch (e) {
err = e;
}
assert.equal('currently only image/png is supported', err.message);
},
'test PNGStream': function(assert, beforeExit){

Loading…
Cancel
Save