Permalink
Browse files

Fixed spec image load with imageDataToPNG callback

  • Loading branch information...
1 parent 124a4a1 commit 9f2c7b20c13d89d9267fb4830cc24560d8b2b85c @jsantell jsantell committed Feb 18, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 spec/ImageDiffSpec.js
View
7 spec/ImageDiffSpec.js
@@ -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);

0 comments on commit 9f2c7b2

Please sign in to comment.