aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/xhr.js
diff options
context:
space:
mode:
authorVojta Jina2011-08-10 16:03:26 +0200
committerIgor Minar2011-11-30 11:03:42 -0500
commite9b57f9df8eb4aaa2c1657d303c78dc68828091b (patch)
treebb85fffe84a3e6c091e855b9ec202a7a1294ccf5 /src/service/xhr.js
parent45f47ff6cd264dcd347e6df92c9ef39b0ae8aaba (diff)
downloadangular.js-e9b57f9df8eb4aaa2c1657d303c78dc68828091b.tar.bz2
fix($browser.xhr): respond with internal -2 status on jsonp error
If jsonp is not successfull, we return internal status -2. This internal status should by normalized by $xhr into 0, but $xhr needs to distinguish between jsonp-error/abort/timeout (all status 0).
Diffstat (limited to 'src/service/xhr.js')
-rw-r--r--src/service/xhr.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/service/xhr.js b/src/service/xhr.js
index 7970622b..e9421caf 100644
--- a/src/service/xhr.js
+++ b/src/service/xhr.js
@@ -165,7 +165,7 @@
function() {
element(':button:contains("Invalid JSONP")').click();
element(':button:contains("fetch")').click();
- expect(binding('code')).toBe('code=');
+ expect(binding('code')).toBe('code=-2');
expect(binding('response')).toBe('response=Request failed');
});
</doc:scenario>