| OLD | NEW |
| 1 /* | 1 /* |
| 2 * THIS FILE INTENTIONALLY LEFT BLANK | 2 * THIS FILE INTENTIONALLY LEFT BLANK |
| 3 * | 3 * |
| 4 * More specifically, this file is intended for vendors to implement | 4 * More specifically, this file is intended for vendors to implement |
| 5 * code needed to integrate testharness.js tests with their own test systems. | 5 * code needed to integrate testharness.js tests with their own test systems. |
| 6 * | 6 * |
| 7 * Typically such integration will attach callbacks when each test is | 7 * Typically such integration will attach callbacks when each test is |
| 8 * has run, using add_result_callback(callback(test)), or when the whole test fi
le has | 8 * has run, using add_result_callback(callback(test)), or when the whole test fi
le has |
| 9 * completed, using add_completion_callback(callback(tests, harness_status)). | 9 * completed, using add_completion_callback(callback(tests, harness_status)). |
| 10 * | 10 * |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 document.documentElement.appendChild(document.createElement("body"))
; | 119 document.documentElement.appendChild(document.createElement("body"))
; |
| 120 document.body.appendChild(results); | 120 document.body.appendChild(results); |
| 121 | 121 |
| 122 if (self.testRunner) | 122 if (self.testRunner) |
| 123 testRunner.notifyDone(); | 123 testRunner.notifyDone(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 if (document.readyState === 'loading') { | 126 if (document.readyState === 'loading') { |
| 127 window.addEventListener('load', done); | 127 window.addEventListener('load', done); |
| 128 } else { | 128 } else { |
| 129 done(); | 129 setTimeout(done, 0); |
| 130 } | 130 } |
| 131 }); | 131 }); |
| OLD | NEW |