[ol.Tile] as an isLoading method

This commit is contained in:
Éric Lemoine
2012-06-22 10:51:30 +02:00
parent f25b3aa350
commit ad2c3e15e3
2 changed files with 20 additions and 0 deletions

View File

@@ -42,6 +42,11 @@ describe("ol.Tile", function() {
tile.handleImageLoad();
expect(tile.isLoaded()).toBeTruthy();
});
it("unsets the loading flag", function() {
tile.loading_ = true;
tile.handleImageLoad();
expect(tile.isLoading()).toBeFalsy();
});
});
describe("handle image error", function() {
@@ -56,5 +61,10 @@ describe("ol.Tile", function() {
tile.handleImageError();
expect(spy).toHaveBeenCalled();
});
it("unsets the loading flag", function() {
tile.loading_ = true;
tile.handleImageError();
expect(tile.isLoading()).toBeFalsy();
});
});
});