Adding cross-browser XMLHttpRequest functionality and convenience methods around it in the OpenLayers.Request namespace. Deprecating OpenLayers.Ajax.Request. Full support sync/async requests using all HTTP verbs now. r=elemoine (closes #1565)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@7335 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2008-06-09 19:51:38 +00:00
parent c3ca41b3be
commit 3c70e78e47
18 changed files with 924 additions and 120 deletions
+8 -8
View File
@@ -64,12 +64,12 @@
var g_Success = {};
var tLoadURL = OpenLayers.loadURL;
OpenLayers.loadURL = function(url, params, caller, onComplete) {
t.ok(url == tile.url, "tile's url correctly passed as 1st param to loadURL");
t.ok(params == null, "null passed as 2nd param to loadURL");
t.ok(caller == tile, "tile passed as 3rd param to loadURL");
t.ok(onComplete == g_Success, "success param from loadFeaturesForRegion() passed as 4th param to loadURL");
var _get = OpenLayers.Request.GET;
OpenLayers.Request.GET = function(config) {
t.ok(config.url == tile.url, "tile's url correctly passed");
t.ok(config.params == null, "null params");
t.ok(config.scope == tile, "tile passed as scope");
t.ok(config.success == g_Success, "success passed");
};
//no running request -- 4 tests
@@ -82,8 +82,8 @@
}
};
OpenLayers.Tile.WFS.prototype.loadFeaturesForRegion.apply(tile, [g_Success]);
OpenLayers.loadURL = tLoadURL;
OpenLayers.Request.GET = _get;
}
function test_Tile_WFS_destroy(t) {