+});
+
+test("$.ajax - beforeSend", function() {
+ expect(1);
+ stop();
+ var check = false;
+ $.ajax({
+ url: url("data/name.php"),
+ data: {'req': true},
+ beforeSend: function(xml) {
+ check = true
+ },
+ success: function(data) {
+ ok( check, "check beforeSend was executed" );
+ start();
+ }
+ });
+});
+
+test("ajaxSetup()", function() {
+ expect(1);
+ stop();
+ $.ajaxSetup({
+ url: url("data/name.php?name=foo"),
+ success: function(msg){
+ ok( msg == 'bar', 'Check for GET' );
+ start();
+ }
+ });
+ $.ajax();
+});
+
+test("evalScripts() with no script elements", function() {
+ expect(2);
+
+ var data = "this is just some bogus text";
+ $('#foo').html(data);
+ ok ( true, 'before evalScripts()');
+ try {
+ $('#foo').evalScripts();
+ } catch(e) {
+ ok (false, 'exception evaluating scripts: ' + e.message);
+ }
+ ok ( true, 'after evalScripts()');
+});
+
+test("custom timeout does not set error message when timeout occurs, see #970", function() {
+ stop();
+ $.ajax({
+ url: "data/name.php?wait=10",
+ timeout: 500,
+ error: function(request, status) {
+ ok( status != null, "status shouldn't be null in error handler" );
+ equals( "timeout", status );
+ start();
+ }
+ });
+});
+
+}