aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax/ajaxTest.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-04 19:37:49 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-04 19:37:49 +0000
commita6ce3031871aca7c067672e91d298dd2a5bf176c (patch)
treec7eea3b65e6da46cb6bdceed2426f81ed13bc51b /src/ajax/ajaxTest.js
parent94e59e287a9fde9425cd96713e8130aef06bc431 (diff)
downloadjquery-a6ce3031871aca7c067672e91d298dd2a5bf176c.tar.gz
jquery-a6ce3031871aca7c067672e91d298dd2a5bf176c.zip
Simplified XMLHttpRequest shadow (tested on 5.5, 6 and 7); Introduced preprocess callback (#384) - IE seems to fail to send the correct headers
Diffstat (limited to 'src/ajax/ajaxTest.js')
-rw-r--r--src/ajax/ajaxTest.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ajax/ajaxTest.js b/src/ajax/ajaxTest.js
index 98f7cfcdd..a84df1d6c 100644
--- a/src/ajax/ajaxTest.js
+++ b/src/ajax/ajaxTest.js
@@ -277,4 +277,21 @@ test("$.ajax - xml: non-namespace elements inside namespaced elements", function
start();
}
});
+});
+
+test("$.ajax - preprocess", function() {
+ expect(1);
+ stop();
+ var customHeader = "value-for-custom-header";
+ $.ajax({
+ url: "data/name.php",
+ data: {'req': true},
+ preprocess: function(xml) {
+ xml.setRequestHeader('customHeader', customHeader)
+ },
+ success: function(data) {
+ ok( data == customHeader, "check return value, should be the custom header sent" );
+ start();
+ }
+ });
}); \ No newline at end of file