Skip to content

Commit

Permalink
Fixes #13276. Unit test is enough since the 2.x XHR transport already…
Browse files Browse the repository at this point in the history
… dismissed the XML as parsed by the XHR instance.
  • Loading branch information
jaubourg committed Jan 21, 2013
1 parent cbe0c2e commit 4c6fb65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/unit/ajax.js
Expand Up @@ -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, {
Expand Down

0 comments on commit 4c6fb65

Please sign in to comment.