Skip to content

Commit

Permalink
Fixed spec image load with imageDataToPNG callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell committed Feb 18, 2012
1 parent 124a4a1 commit 9f2c7b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/ImageDiffSpec.js
Expand Up @@ -452,13 +452,14 @@ describe('ImageUtils', function() {
context.drawImage(image, 0, 0);
imageData = context.getImageData(0, 0, image.width, image.height);

imagediff.imageDataToPNG(imageData, output);
imagediff.imageDataToPNG(imageData, output, function() {
oImage.src = output;
});
});

oImage.src = output;
waitsFor(function () {
return oImage.complete;
}, 'image not loaded.', 5000);
}, 'image not loaded.', 2000);

runs(function () {
oImageData = imagediff.toImageData(oImage);
Expand Down

0 comments on commit 9f2c7b2

Please sign in to comment.