Renamed $.ajax's "before"-option to "beforeSend" to prevent conflict with form plugin...
[jquery.git] / src / ajax / ajaxTest.js
index 0a740aa..cbc15ad 100644 (file)
@@ -282,12 +282,12 @@ test("$.ajax - xml: non-namespace elements inside namespaced elements", function
 test("$.ajax - preprocess", function() {
        expect(1);
        stop();
-       var customHeader = "value-for-custom-header";
+       var customHeader = "value";
        $.ajax({
                url: "data/name.php", 
                data: {'req': true},
-               before: function(xml) {
-                       xml.setRequestHeader('customHeader', customHeader)
+               beforeSend: function(xml) {
+                       xml.setRequestHeader('X-Custom-Header', customHeader);
                },
                success: function(data) {
                        ok( data == customHeader, "check return value, should be the custom header sent" );