A few corrections to the testsuite to imrove the failure testing
[jquery.git] / build / test / data / testrunner.js
index c3afea3..6da41c3 100644 (file)
@@ -33,9 +33,13 @@ function process() {
        }
 }
 
-function stop() {
+function stop(allowFailure) {
        _config.blocking = true;
-       _config.timeout = setTimeout(start, _config.asyncTimeout * 1000);
+       var handler = allowFailure ? start : function() {
+               ok( false, "Test timed out" );
+               start();
+       };
+       _config.timeout = setTimeout(handler, _config.asyncTimeout * 1000);
 }
 function start() {
        if(_config.timeout)
@@ -55,7 +59,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");
        });
 }