Merge pull request #297 from ahocevar/tileloadstart

tileloadstart event and fixed crossorigin handling. r=@fredj
This commit is contained in:
ahocevar
2012-03-07 01:30:36 -08:00
3 changed files with 20 additions and 10 deletions

View File

@@ -506,7 +506,7 @@
}
function test_Layer_Grid_addTileMonitoringHooks(t) {
t.plan(17);
t.plan(18);
layer = new OpenLayers.Layer.Grid();
layer.events = {
@@ -546,10 +546,11 @@
t.eq(g_events[0][0], "loadstart", "loadstart event triggered when numLoadingTiles is 0");
t.eq(layer.numLoadingTiles, 1, "numLoadingTiles incremented");
t.eq(g_events[1][0], "tileloadstart", "tileloadstart event triggered");
g_events = [];
tile.onLoadStart.apply(layer);
t.eq(g_events.length, 0, "loadstart event not triggered when numLoadingTiles is not 0");
t.eq(g_events.length, 1, "tileloadstart, but not loadstart triggered when numLoadingTiles is not 0");
t.eq(layer.numLoadingTiles, 2, "numLoadingTiles incremented");