From 4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d Mon Sep 17 00:00:00 2001 From: jaubourg Date: Mon, 21 Jan 2013 02:53:50 +0100 Subject: [PATCH] Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the XML as parsed by the XHR instance. --- test/unit/ajax.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 27d8e437a..7bc48c997 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -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("blibli") ).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, { -- 2.39.5