Commit 71bd828d authored by gnarf's avatar gnarf

Grouped up the test

parent 14e9da51
...@@ -492,7 +492,7 @@ test(".ajax() - hash", function() { ...@@ -492,7 +492,7 @@ test(".ajax() - hash", function() {
test("jQuery ajax - cross-domain detection", function() { test("jQuery ajax - cross-domain detection", function() {
expect( 4 ); expect( 5 );
var loc = document.location, var loc = document.location,
otherPort = loc.port === 666 ? 667 : 666, otherPort = loc.port === 666 ? 667 : 666,
...@@ -507,6 +507,14 @@ test("jQuery ajax - cross-domain detection", function() { ...@@ -507,6 +507,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({ jQuery.ajax({
dataType: "jsonp", dataType: "jsonp",
url: loc.protocol + '//somewebsitethatdoesnotexist-656329477541.com:' + ( loc.port || 80 ), url: loc.protocol + '//somewebsitethatdoesnotexist-656329477541.com:' + ( loc.port || 80 ),
...@@ -2239,18 +2247,6 @@ test("jQuery.ajax - active counter", function() { ...@@ -2239,18 +2247,6 @@ test("jQuery.ajax - active counter", function() {
ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active ); ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active );
}); });
test("jQuery.ajax - compatible with AIR urls"), function() {
expect( 1 );
stop();
$.ajax({
url: "app:/testing",
beforeSend: function() {
ok( this.crossDomain, "Detected crossDomain for AIR Url" );
return false;
}
});
});
} }
//} //}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment