Skip to content

Commit 7224892

Browse files
committed
Features detect all tests that can run in IE9
1 parent 2c0e742 commit 7224892

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

ajax-test.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ QUnit.test("added to namespace (#99)", function(){
1919
QUnit.equal(namespace.ajax, ajax);
2020
});
2121

22-
QUnit.asyncTest("cross domain post request should change data to form data (#90)", function () {
23-
ajax({
24-
type: "POST",
25-
url: "http://httpbin.org/post",
26-
data: {'message': 'VALUE'},
27-
dataType: 'application/json'
28-
}).then(function(resp){
29-
QUnit.equal(resp.form.message, "VALUE");
30-
start();
31-
});
32-
});
33-
3422
QUnit.asyncTest("GET requests with dataType parse JSON (#106)", function(){
3523
ajax({
3624
type: "get",
@@ -94,8 +82,22 @@ QUnit.asyncTest("ignores case of type parameter for a post request (#100)", func
9482
});
9583
});
9684

97-
if("abort" in XMLHttpRequest.prototype || (XMLHttpRequest._XHR && "abort" in XMLHttpRequest.prototype)) {
85+
if(typeof XDomainRequest === 'undefined') {
86+
QUnit.asyncTest("cross domain post request should change data to form data (#90)", function () {
87+
ajax({
88+
type: "POST",
89+
url: "http://httpbin.org/post",
90+
data: {'message': 'VALUE'},
91+
dataType: 'application/json'
92+
}).then(function(resp){
93+
QUnit.equal(resp.form.message, "VALUE");
94+
start();
95+
});
96+
});
97+
}
9898

99+
if(System.env !== 'canjs-test') {
100+
// Brittle in IE 9
99101
QUnit.asyncTest("abort", function () {
100102
var promise = ajax({
101103
type: "get",

0 commit comments

Comments
 (0)