Commit f37fc996 authored by jaubourg's avatar jaubourg

Considers Safari XMLHttpRequest's bug when testing for custom status text....

Considers Safari XMLHttpRequest's bug when testing for custom status text. Will have to be revisited when $.browser.chrome is introduced.
parent 3589a53d
...@@ -2096,10 +2096,10 @@ test( "jQuery.ajax - statusText" , 4, function() { ...@@ -2096,10 +2096,10 @@ test( "jQuery.ajax - statusText" , 4, function() {
stop(); stop();
jQuery.ajax( url( "data/statusText.php?status=200&text=Hello" ) ).done(function( _, statusText, jqXHR ) { jQuery.ajax( url( "data/statusText.php?status=200&text=Hello" ) ).done(function( _, statusText, jqXHR ) {
strictEqual( statusText, "success", "callback status text ok for success" ); strictEqual( statusText, "success", "callback status text ok for success" );
strictEqual( jqXHR.statusText, "Hello", "jqXHR status text ok for success" ); ok( jqXHR.statusText === "Hello" || jQuery.browser.safari && jqXHR.statusText === "OK", "jqXHR status text ok for success (" + jqXHR.statusText + ")" );
jQuery.ajax( url( "data/statusText.php?status=404&text=World" ) ).fail(function( jqXHR, statusText ) { jQuery.ajax( url( "data/statusText.php?status=404&text=World" ) ).fail(function( jqXHR, statusText ) {
strictEqual( statusText, "error", "callback status text ok for error" ); strictEqual( statusText, "error", "callback status text ok for error" );
strictEqual( jqXHR.statusText, "World", "jqXHR status text ok for error" ); ok( jqXHR.statusText === "World" || jQuery.browser.safari && jqXHR.statusText === "Not Found", "jqXHR status text ok for error (" + jqXHR.statusText + ")" );
start(); start();
}); });
}); });
......
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