Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the XML as parsed by the XHR instance.

This commit is contained in:
jaubourg 2013-01-21 02:53:50 +01:00
parent cbe0c2ef90
commit 4c6fb65d35

View File

@ -1441,6 +1441,22 @@ module( "ajax", {
});
ajaxTest( "#13276 - jQuery.ajax() - compatibility between XML documents from ajax requests and parsed string", 1, {
url: "data/dashboard.xml",
dataType: "xml",
success: function( ajaxXML ) {
var parsedXML = jQuery( jQuery.parseXML("<tab title=\"Added\">blibli</tab>") ).find("tab");
ajaxXML = jQuery( ajaxXML );
try {
ajaxXML.find("infowindowtab").append( parsedXML );
} catch( e ) {
strictEqual( e, undefined, "error" );
return;
}
strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
}
});
//----------- jQuery.ajaxPrefilter()
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, {