replacing tabs with spaces. no functional diffs here.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-03-29 00:38:47 +00:00
parent d46f884201
commit 136a37bf2f
14 changed files with 106 additions and 106 deletions
+53 -53
View File
@@ -16,64 +16,64 @@
}
function test_Layer_WFS_destroy(t) {
t.plan(13);
var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy;
OpenLayers.Layer.Vector.prototype.destroy = function() {
g_VectorDestroyed = true;
}
t.plan(13);
var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy;
OpenLayers.Layer.Vector.prototype.destroy = function() {
g_VectorDestroyed = true;
}
var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy;
OpenLayers.Layer.Markers.prototype.destroy = function() {
g_MarkersDestroyed = true;
}
var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy;
OpenLayers.Layer.Markers.prototype.destroy = function() {
g_MarkersDestroyed = true;
}
var layer = {
'vectorMode': true,
'tile': {
'destroy': function() {
t.ok(true, "wfs layer's tile is destroyed");
}
},
'ratio': {},
'featureClass': {},
'format': {},
'formatObject': {
'destroy': function() {
t.ok(true, "wfs layer's format object is destroyed");
}
},
'formatOptions': {},
'encodeBBOX': {},
'extractAttributes': {}
};
//this call should set off two tests (destroys for tile and format object)
g_VectorDestroyed = null;
g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []);
var layer = {
'vectorMode': true,
'tile': {
'destroy': function() {
t.ok(true, "wfs layer's tile is destroyed");
}
},
'ratio': {},
'featureClass': {},
'format': {},
'formatObject': {
'destroy': function() {
t.ok(true, "wfs layer's format object is destroyed");
}
},
'formatOptions': {},
'encodeBBOX': {},
'extractAttributes': {}
};
//this call should set off two tests (destroys for tile and format object)
g_VectorDestroyed = null;
g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []);
t.ok(g_VectorDestroyed && !g_MarkersDestroyed, "when vector mode is set to true, the default vector layer's destroy() method is called");
t.eq(layer.vectorMode, null, "'vectorMode' property nullified");
t.eq(layer.tile, null, "'tile' property nullified");
t.eq(layer.ratio, null, "'ratio' property nullified");
t.eq(layer.featureClass, null, "'featureClass' property nullified");
t.eq(layer.format, null, "'format' property nullified");
t.eq(layer.formatObject, null, "'formatObject' property nullified");
t.eq(layer.formatOptions, null, "'formatOptions' property nullified");
t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified");
t.eq(layer.extractAttributes, null, "'extractAttributes' property nullified");
t.ok(g_VectorDestroyed && !g_MarkersDestroyed, "when vector mode is set to true, the default vector layer's destroy() method is called");
t.eq(layer.vectorMode, null, "'vectorMode' property nullified");
t.eq(layer.tile, null, "'tile' property nullified");
t.eq(layer.ratio, null, "'ratio' property nullified");
t.eq(layer.featureClass, null, "'featureClass' property nullified");
t.eq(layer.format, null, "'format' property nullified");
t.eq(layer.formatObject, null, "'formatObject' property nullified");
t.eq(layer.formatOptions, null, "'formatOptions' property nullified");
t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified");
t.eq(layer.extractAttributes, null, "'extractAttributes' property nullified");
layer.vectorMode = false;
layer.vectorMode = false;
//this call will *not* set off two tests (tile and format object are null)
g_VectorDestroyed = null;
g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []);
t.ok(!g_VectorDestroyed && g_MarkersDestroyed, "when vector mode is set to false, the default markers layer's destroy() method is called");
OpenLayers.Layer.Vector.prototype.destroy = tVectorDestroy;
OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy;
//this call will *not* set off two tests (tile and format object are null)
g_VectorDestroyed = null;
g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []);
t.ok(!g_VectorDestroyed && g_MarkersDestroyed, "when vector mode is set to false, the default markers layer's destroy() method is called");
OpenLayers.Layer.Vector.prototype.destroy = tVectorDestroy;
OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy;
}
function test_Layer_WFS_mapresizevector(t) {