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