patch for #831 - simplify the notion of untiled (now an option on grid layers called 'singleTile') and implementing loading events for gridded/untiled layers. thanks tim and chris for reviewing this beast.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3725 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
var tile;
|
||||
|
||||
function test_01_Tile_constructor (t) {
|
||||
t.plan( 8 );
|
||||
t.plan( 9 );
|
||||
|
||||
var layer = new Object(); // bogus layer
|
||||
var position = new OpenLayers.Pixel(10,20);
|
||||
@@ -24,6 +24,33 @@
|
||||
|
||||
t.ok( tile.id != null, "tile is given an id");
|
||||
t.ok( tile.id.startsWith("Tile_"), "tile's id starts correctly");
|
||||
t.ok( tile.events != null, "tile's events intitialized");
|
||||
}
|
||||
|
||||
function test_99_Tile_destroy(t) {
|
||||
t.plan( 6 );
|
||||
|
||||
|
||||
var layer = new Object(); // bogus layer
|
||||
var position = new OpenLayers.Pixel(10,20);
|
||||
var bounds = new OpenLayers.Bounds(1,2,3,4);
|
||||
var url = "bobob";
|
||||
var size = new OpenLayers.Size(5,6);
|
||||
|
||||
tile = new OpenLayers.Tile(layer, position, bounds, url, size);
|
||||
tile.events.destroy = function() {
|
||||
t.ok(true, "tile events destroy() called");
|
||||
}
|
||||
|
||||
|
||||
tile.destroy();
|
||||
|
||||
t.ok(tile.layer == null, "tile.layer set to null");
|
||||
t.ok(tile.bounds == null, "tile.bounds set to null");
|
||||
t.ok(tile.size == null, "tile.size set to null");
|
||||
t.ok(tile.position == null, "tile.position set to null");
|
||||
|
||||
t.ok(tile.events == null, "tile.events set to null");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user