@@ -71,21 +71,6 @@ QUnit.module( "ajax", {
71
71
} ;
72
72
} ) ;
73
73
74
- ajaxTest ( "jQuery.ajax() - do not execute js (crossOrigin)" , 2 , function ( assert ) {
75
- return {
76
- create :function ( options ) {
77
- options . crossDomain = true ;
78
- return jQuery . ajax ( url ( "data/script.php?header=ecma" ) , options ) ;
79
- } ,
80
- success :function ( ) {
81
- assert . ok ( true , "success" ) ;
82
- } ,
83
- complete :function ( ) {
84
- assert . ok ( true , "complete" ) ;
85
- }
86
- } ;
87
- } ) ;
88
-
89
74
ajaxTest ( "jQuery.ajax() - execute js for crossOrigin when dataType option is provided" , 3 ,
90
75
function ( assert ) {
91
76
return {
@@ -113,6 +98,11 @@ QUnit.module( "ajax", {
113
98
success :function ( ) {
114
99
assert . ok ( true , "success" ) ;
115
100
} ,
101
+ fail :function ( ) {
102
+ if ( jQuery . support . cors === false ) {
103
+ assert . ok ( true , "fail" ) ;
104
+ }
105
+ } ,
116
106
complete :function ( ) {
117
107
assert . ok ( true , "complete" ) ;
118
108
}
@@ -1777,22 +1767,21 @@ QUnit.module( "ajax", {
1777
1767
done :function ( data ) {
1778
1768
assert . ok ( false , "done: " + data ) ;
1779
1769
} ,
1780
- fail :function ( jqXHR , status , error ) {
1781
- assert . ok ( true , "exception caught: " + error ) ;
1782
- assert . strictEqual ( jqXHR . status , 0 , "proper status code" ) ;
1783
- assert . strictEqual ( status , "error" , "proper status" ) ;
1784
- }
1785
- } , {
1786
- url :"http://domain.org:80d" ,
1787
- done :function ( data ) {
1788
- assert . ok ( false , "done: " + data ) ;
1789
- } ,
1790
- fail :function ( _ , status , error ) {
1791
- assert . ok ( true , "fail: " + status + " - " + error ) ;
1792
- }
1793
- } ] ;
1794
- }
1795
- ) ;
1770
+ fail :function ( jqXHR , status , error ) {
1771
+ assert . ok ( true , "exception caught: " + error ) ;
1772
+ assert . strictEqual ( jqXHR . status , 0 , "proper status code" ) ;
1773
+ assert . strictEqual ( status , "error" , "proper status" ) ;
1774
+ }
1775
+ } , {
1776
+ url :"http://domain.org:80d" ,
1777
+ done :function ( data ) {
1778
+ assert . ok ( false , "done: " + data ) ;
1779
+ } ,
1780
+ fail :function ( _ , status , error ) {
1781
+ assert . ok ( true , "fail: " + status + " - " + error ) ;
1782
+ }
1783
+ } ] ;
1784
+ } ) ;
1796
1785
1797
1786
ajaxTest ( "gh-2587 - when content-type not xml, but looks like one" , 1 , function ( assert ) {
1798
1787
return {