A few corrections to the testsuite to imrove the failure testing

This commit is contained in:
Jörn Zaefferer 2006-12-21 15:23:59 +00:00
parent a0d5e89a1e
commit 98b1b580c7
3 changed files with 25 additions and 16 deletions

View file

@ -33,12 +33,13 @@ function process() {
}
}
function stop() {
function stop(allowFailure) {
_config.blocking = true;
_config.timeout = setTimeout(function() {
var handler = allowFailure ? start : function() {
ok( false, "Test timed out" );
start();
}, _config.asyncTimeout * 1000);
};
_config.timeout = setTimeout(handler, _config.asyncTimeout * 1000);
}
function start() {
if(_config.timeout)