add abort method to wfs protocol, r=tschaub (closes #1943)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8933 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -164,6 +164,29 @@
|
||||
|
||||
OpenLayers.Request.POST = _POST;
|
||||
}
|
||||
|
||||
function test_abort(t) {
|
||||
t.plan(1);
|
||||
var protocol = new OpenLayers.Protocol.WFS({
|
||||
url: "http://example.com",
|
||||
featureNS: "http://example.com#namespace",
|
||||
featureType: "type"
|
||||
});
|
||||
|
||||
var response = {
|
||||
priv: {
|
||||
abort: function() {
|
||||
aborted = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// call abort with mocked response
|
||||
var aborted = false;
|
||||
protocol.abort(response);
|
||||
t.eq(aborted, true, "abort called on response.priv");
|
||||
|
||||
}
|
||||
|
||||
function readXML(id) {
|
||||
var xml = document.getElementById(id).firstChild.nodeValue;
|
||||
|
||||
Reference in New Issue
Block a user