]> source.dussan.org Git - jquery.git/commitdiff
Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the...
authorjaubourg <j@ubourg.net>
Mon, 21 Jan 2013 01:53:50 +0000 (02:53 +0100)
committerjaubourg <j@ubourg.net>
Mon, 21 Jan 2013 01:53:50 +0000 (02:53 +0100)
test/unit/ajax.js

index 27d8e437ace6ad49349f7d45385167370597ac5e..7bc48c997695f876735374ddd3cba6505b03d9cb 100644 (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, {