foobar = null;
testFoo = undefined;
-
+
var verifyEvaluation = function() {
ok( testFoo == "foo", 'Check if script was evaluated for datatype html' );
ok( foobar == "bar", 'Check if script src was evaluated for datatype html' );
/* Test disabled, too many simultaneous requests
ok( $.get(url(target), success), "get" );
- ok( $.getIfModified(url(target), success), "getIfModified" );
ok( $.post(url(target), success), "post" );
ok( $.getScript(url("data/test.js"), success), "script" );
ok( $.getJSON(url("data/json_obj.js"), success), "json" );
});
});
-test("$.getIfModified(String, Hash, Function)", function() {
- expect(1);
- stop();
- $.getIfModified(url("data/name.html"), function(msg) {
- ok( /^ERROR/.test(msg), 'Check ifModified' );
- start();
- });
-});
-
test("$.getScript(String, Function) - with callback", function() {
expect(2);
stop();
});
});
-test("$.ajaxTimeout(Number) - with global timeout", function() {
+test("$.ajaxSetup({timeout: Number}) - with global timeout", function() {
stop();
var passed = 0;
- $.ajaxTimeout(1000);
+ $.ajaxSetup({timeout: 1000});
var pass = function() {
passed++;
});
// reset timeout
- $.ajaxTimeout(0);
+ $.ajaxSetup({timeout: 0});
});
-test("$.ajaxTimeout(Number) with localtimeout", function() {
- stop(); $.ajaxTimeout(50);
+test("$.ajaxSetup({timeout: Number}) with localtimeout", function() {
+ stop();
+ $.ajaxSetup({timeout: 50});
+
$.ajax({
type: "GET",
timeout: 5000,
start();
}
});
+
// reset timeout
- $.ajaxTimeout(0);
+ $.ajaxSetup({timeout: 0});
});
test("$.ajax - simple get", function() {