Commit 7efffc6d authored by Eugene Lazutkin's avatar Eugene Lazutkin

Added xhrPut() and xhrDelete() tests. Corrected an IE-specific bug (the...

Added xhrPut() and xhrDelete() tests. Corrected an IE-specific bug (the trailing comma). Refs #3121.

git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@9426 560b804f-0ae3-0310-86f3-f6aa0a117693
parent 87222582
......@@ -258,6 +258,42 @@
});
return d;
},
function xhrPut(t){
var d = new doh.Deferred();
var td = dojo.xhrPut({
url: "xhr.html?foo=bar", // self
content: { color: "blue"},
handle: function(res, ioArgs){
if((dojo._isDocumentOk(ioArgs.xhr))||
(ioArgs.xhr.status == 403)
){
d.callback(true);
}else{
d.errback(false);
}
}
});
// t.t(td instanceof dojo.Deferred);
return d;
},
function xhrDelete(t){
var d = new doh.Deferred();
var td = dojo.xhrDelete({
url: "xhr.html", // self
preventCache: true,
handle: function(res, ioArgs){
if((dojo._isDocumentOk(ioArgs.xhr))||
(ioArgs.xhr.status == 403)
){
d.callback(true);
}else{
d.errback(false);
}
}
});
// t.t(td instanceof dojo.Deferred);
return d;
},
function xhrCancel(t){
var d = new doh.Deferred();
var td = dojo.xhrPost({
......@@ -273,7 +309,7 @@
td.cancel();
// t.t(td instanceof dojo.Deferred);
return d;
},
}
// FIXME: need to add tests for rawPost
// FIXME: need to add tests for wrapForm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment