From: Alan Knowles Date: Sun, 27 May 2012 07:56:21 +0000 (+0800) Subject: tests/soup.js X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=ffe1cd40589fb937e094e91fdaf0655009d3facb tests/soup.js --- diff --git a/tests/soup.js b/tests/soup.js index c3a68979..41e2bdc2 100644 --- a/tests/soup.js +++ b/tests/soup.js @@ -105,7 +105,17 @@ XObject.extend(XMLHttpRequest,{ send : function(data) { this._message.set_request('application/x-www-form-urlencoded', Soup.MemoryUse.COPY, data, data.length) - _this.session.send_message(this._message); + + if (this._async) { + this._session.queue_message(this._message, function() { + // got some data... fire some evetns. + }) + + } + var status = this._session.send_message(this._message); + this.responseText = msg.response_body.data; + this.status = 4; + return status; }, abort : function()