aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2013-01-21 02:44:16 +0100
committerjaubourg <j@ubourg.net>2013-01-21 02:44:16 +0100
commitb83081ba644b70876a64b3abd7eb11109c1e7a1d (patch)
tree28cc16c5fb5fc835753eedc71819aa9f8f0fcbb7 /test
parentdf47eb73f3d3829834137258acbd448a6a9d2440 (diff)
downloadjquery-b83081ba644b70876a64b3abd7eb11109c1e7a1d.tar.gz
jquery-b83081ba644b70876a64b3abd7eb11109c1e7a1d.zip
Never use the XML as parsed by the XHR instance. Use raw text instead and let the ajax conversion logic do the trick. -20 min/gzipped. Fixes #13276. Unit test added.
Diffstat (limited to 'test')
-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 f88b5d7cc..86d1b1912 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1483,6 +1483,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, {