last bit of tabs. sorry this was so clunky, in the middle of another patch. (no functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+14
-14
@@ -1028,13 +1028,13 @@
|
|||||||
t.eq( map.controls, null, "map.controls is null after destroy" );
|
t.eq( map.controls, null, "map.controls is null after destroy" );
|
||||||
t.eq( map.viewPortDiv, null, "map's viewportDiv nullified");
|
t.eq( map.viewPortDiv, null, "map's viewportDiv nullified");
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_Map_getMaxExtent(t){
|
function test_Map_getMaxExtent(t){
|
||||||
t.plan(5);
|
t.plan(5);
|
||||||
|
|
||||||
var options = null;
|
var options = null;
|
||||||
var map = {};
|
var map = {};
|
||||||
|
|
||||||
//null options, no baseLayer
|
//null options, no baseLayer
|
||||||
var maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
var maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
||||||
t.eq(maxExtent, null, "null options, no baseLayer returns null");
|
t.eq(maxExtent, null, "null options, no baseLayer returns null");
|
||||||
@@ -1049,17 +1049,17 @@
|
|||||||
|
|
||||||
//true options.restricted, valid map.restrictedExtent no baseLayer
|
//true options.restricted, valid map.restrictedExtent no baseLayer
|
||||||
options = {
|
options = {
|
||||||
'restricted': true
|
'restricted': true
|
||||||
};
|
};
|
||||||
map.restrictedExtent = {};
|
map.restrictedExtent = {};
|
||||||
maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
||||||
t.ok(maxExtent == map.restrictedExtent, "true options.restricted, valid map.restrictedExtent no baseLayer returns map.restrictedExtent");
|
t.ok(maxExtent == map.restrictedExtent, "true options.restricted, valid map.restrictedExtent no baseLayer returns map.restrictedExtent");
|
||||||
|
|
||||||
//null options, valid baseLayer
|
//null options, valid baseLayer
|
||||||
options = null;
|
options = null;
|
||||||
map.baseLayer = {
|
map.baseLayer = {
|
||||||
'maxExtent': {}
|
'maxExtent': {}
|
||||||
};
|
};
|
||||||
var maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
var maxExtent = OpenLayers.Map.prototype.getMaxExtent.apply(map, [options]);
|
||||||
t.ok(maxExtent == map.baseLayer.maxExtent, "null options, valid baseLayer returns map.baseLayer.maxExtent");
|
t.ok(maxExtent == map.baseLayer.maxExtent, "null options, valid baseLayer returns map.baseLayer.maxExtent");
|
||||||
}
|
}
|
||||||
@@ -1077,8 +1077,8 @@
|
|||||||
'zoomToExtent': function(extent) {
|
'zoomToExtent': function(extent) {
|
||||||
t.ok(extent == gMaxExtent, "zoomToExtent() always called on return from map.getMaxExtent()");
|
t.ok(extent == gMaxExtent, "zoomToExtent() always called on return from map.getMaxExtent()");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//options is null
|
//options is null
|
||||||
var options = null;
|
var options = null;
|
||||||
gRestricted = null;
|
gRestricted = null;
|
||||||
@@ -1087,8 +1087,8 @@
|
|||||||
|
|
||||||
//valid options
|
//valid options
|
||||||
options = {
|
options = {
|
||||||
'restricted': {}
|
'restricted': {}
|
||||||
};
|
};
|
||||||
gRestricted = null;
|
gRestricted = null;
|
||||||
OpenLayers.Map.prototype.zoomToMaxExtent.apply(map, [options]);
|
OpenLayers.Map.prototype.zoomToMaxExtent.apply(map, [options]);
|
||||||
t.ok(gRestricted == options.restricted, "when valid options argument, 'options.restricted' passed to map.getMaxExtent()");
|
t.ok(gRestricted == options.restricted, "when valid options argument, 'options.restricted' passed to map.getMaxExtent()");
|
||||||
|
|||||||
Reference in New Issue
Block a user