Further fix for #3333, refactored marginRight css hook to use jQuery.swap and compute...
[jquery.git] / test / unit / ajax.js
index 335c2ac..7c572a3 100644 (file)
@@ -492,7 +492,7 @@ test(".ajax() - hash", function() {
 
 test("jQuery ajax - cross-domain detection", function() {
 
-       expect( 4 );
+       expect( 6 );
 
        var loc = document.location,
                otherPort = loc.port === 666 ? 667 : 666,
@@ -509,6 +509,15 @@ test("jQuery ajax - cross-domain detection", function() {
 
        jQuery.ajax({
                dataType: "jsonp",
+               url: 'app:/path',
+               beforeSend: function( _ , s ) {
+                       ok( s.crossDomain , "Adobe AIR app:/ URL detected as cross-domain" );
+                       return false;
+               }
+       });
+
+       jQuery.ajax({
+               dataType: "jsonp",
                url: loc.protocol + '//somewebsitethatdoesnotexist-656329477541.com:' + ( loc.port || 80 ),
                beforeSend: function( _ , s ) {
                        ok( s.crossDomain , "Test different hostnames are detected as cross-domain" );
@@ -527,6 +536,15 @@ test("jQuery ajax - cross-domain detection", function() {
 
        jQuery.ajax({
                dataType: "jsonp",
+               url: "about:blank",
+               beforeSend: function( _ , s ) {
+                       ok( s.crossDomain , "Test about:blank is detected as cross-domain" );
+                       return false;
+               }
+       });
+
+       jQuery.ajax({
+               dataType: "jsonp",
                url: loc.protocol + "//" + loc.host,
                crossDomain: true,
                beforeSend: function( _ , s ) {