Make sure tests continue running even if image is not loaded.

This commit is contained in:
kangax 2011-05-11 18:42:19 -04:00
parent f47a4eff0b
commit 2be834d582

View file

@ -759,8 +759,11 @@
setTimeout(function() {
ok(callbackInvoked, 'callback should be invoked');
ok(objectPassedToCallback instanceof fabric.Image, 'object passed to callback should be an instance of `fabric.Image`');
ok(/fixtures\/very_large_image\.jpg$/.test(objectPassedToCallback.getSrc()), 'image should have correct src');
if (objectPassedToCallback) {
ok(objectPassedToCallback instanceof fabric.Image, 'object passed to callback should be an instance of `fabric.Image`');
ok(/fixtures\/very_large_image\.jpg$/.test(objectPassedToCallback.getSrc()), 'image should have correct src');
}
start();
}, 2000);