Skip to content

Commit 326b660

Browse files
committed
Fix BitmapText unit test.
1 parent 73212d0 commit 326b660

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/spec/DisplayListSpec.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -599,15 +599,13 @@ describe("DisplayList", function () {
599599

600600
var img = new Image();
601601
img.onload = function () {
602+
data.images = [img];
602603
var ss = new createjs.SpriteSheet(data);
603604
var text = new createjs.BitmapText("abcdef\nghijklm\nnopqr\nstuvw\nxyz!,.?", ss);
604605
_this.stage.addChild(text);
605606

606-
// Need to delay this for Safari.
607-
setTimeout(function () {
608-
_this.stage.update();
609-
_this.compareBaseLine("assets/BitmapText.png", done, expect);
610-
}, 5);
607+
_this.stage.update();
608+
_this.compareBaseLine("assets/BitmapText.png", done, expect);
611609
};
612610
img.onerror = function () {
613611
fail(img.src + ' failed to load');

0 commit comments

Comments
 (0)