X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=2a2ac46a1549205ec133d1d02656a06926795158;hb=2ac4067a639856a6035c3bd00aab132c9714b52d;hp=335c2ac4d310348eda37d17a602b9a4d63940c2a;hpb=5b38439011799ae53156d137305d9440e0cddb0a;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 335c2ac..2a2ac46 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -492,7 +492,7 @@ test(".ajax() - hash", function() { test("jQuery ajax - cross-domain detection", function() { - expect( 4 ); + expect( 5 ); var loc = document.location, otherPort = loc.port === 666 ? 667 : 666, @@ -508,6 +508,14 @@ test("jQuery ajax - cross-domain detection", function() { }); jQuery.ajax({ + 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 ) {