Implemented a better error handling for ajax requests. Exceptions caused by dropping...
[jquery.git] / build / test / data / testrunner.js
index c3afea3..86a16d5 100644 (file)
@@ -35,7 +35,10 @@ function process() {
 
 function stop() {
        _config.blocking = true;
-       _config.timeout = setTimeout(start, _config.asyncTimeout * 1000);
+       _config.timeout = setTimeout(function() {
+               ok( false, "Test timed out" );
+               start();
+       }, _config.asyncTimeout * 1000);
 }
 function start() {
        if(_config.timeout)
@@ -55,7 +58,7 @@ function runTest() {
                        _config.stats.bad, ' tests of ', _config.stats.all, ' failed.</p>']
                        .join(''))
                        .appendTo("body");
-               $("<div id='banner'>").addClass(_config.stats.bad ? "fail" : "pass").insertAfter("h1");
+               $("#banner").addClass(_config.stats.bad ? "fail" : "pass");
        });
 }