mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add content harness timeout.
This commit is contained in:
parent
21b0fc35b6
commit
a3afd5e130
1 changed files with 13 additions and 1 deletions
|
@ -12,6 +12,18 @@ function is(a, b) {
|
|||
f(a + " == " + b);
|
||||
}
|
||||
|
||||
var _test_complete = false;
|
||||
var _test_timeout = 10000; //10 seconds
|
||||
function finish() {
|
||||
_test_complete = true;
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
function _test_timed_out() {
|
||||
if (!_test_complete) {
|
||||
_fail('test timed out (' + _test_timeout/1000 + 's)');
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(_test_timed_out, _test_timeout);
|
Loading…
Add table
Add a link
Reference in a new issue