aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2013-01-21 02:53:50 +0100
committerjaubourg <j@ubourg.net>2013-01-21 02:53:50 +0100
commit4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d (patch)
treeab7157ccf5a88fe4852546ec4d077fe0d491e486
parentcbe0c2ef90669c4c145227a2ddf41993583f5437 (diff)
downloadjquery-4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d.tar.gz
jquery-4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d.zip
Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the XML as parsed by the XHR instance.
-rw-r--r--test/unit/ajax.js16
1 files changed, 16 insertions, 0 deletions
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("<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, {