| OLD | NEW |
| 1 // Worker tests need to set this for themselves in the .html file. | 1 // Worker tests need to set this for themselves in the .html file. |
| 2 if (typeof window !== 'undefined') | 2 if (typeof window !== 'undefined') |
| 3 window.jsTestIsAsync = true; | 3 window.jsTestIsAsync = true; |
| 4 | 4 |
| 5 var timeoutID = null; | 5 var timeoutID = null; |
| 6 | 6 |
| 7 function endTest() | 7 function endTest() |
| 8 { | 8 { |
| 9 clearTimeout(timeoutID); | 9 clearTimeout(timeoutID); |
| 10 finishJSTest(); | 10 finishJSTest(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Each failure to connect to 127.0.0.1 takes 1 second on Windows. | 56 // Each failure to connect to 127.0.0.1 takes 1 second on Windows. |
| 57 // Allow 2 seconds for padding. | 57 // Allow 2 seconds for padding. |
| 58 timeoutID = setTimeout(timeOutCallback, 2000); | 58 timeoutID = setTimeout(timeOutCallback, 2000); |
| 59 } | 59 } |
| 60 | 60 |
| 61 function timeOutCallback() | 61 function timeOutCallback() |
| 62 { | 62 { |
| 63 debug("Timed out..."); | 63 debug("Timed out..."); |
| 64 endTest(); | 64 endTest(); |
| 65 } | 65 } |
| OLD | NEW |