| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Assume it's a CSSWG style test, and anything other than the l
og div isn't | 102 // Assume it's a CSSWG style test, and anything other than the l
og div isn't |
| 103 // material to the testrunner output, so should be hidden from t
he text dump | 103 // material to the testrunner output, so should be hidden from t
he text dump |
| 104 for (var i = 0; i < document.body.children.length; i++) { | 104 for (var i = 0; i < document.body.children.length; i++) { |
| 105 if (document.body.children[i] === logDiv) continue; | 105 if (document.body.children[i] === logDiv) continue; |
| 106 | 106 |
| 107 document.body.children[i].style.visibility = "hidden"; | 107 document.body.children[i].style.visibility = "hidden"; |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 // Add results element to document | 112 // Add results element to document. |
| 113 if (!document.body) |
| 114 document.documentElement.appendChild(document.createElement("body"))
; |
| 113 document.body.appendChild(results); | 115 document.body.appendChild(results); |
| 114 | 116 |
| 115 if (self.testRunner) | 117 if (self.testRunner) |
| 116 testRunner.notifyDone(); | 118 testRunner.notifyDone(); |
| 117 } | 119 } |
| 118 | 120 |
| 119 if (!document.body || document.readyState === 'loading') { | 121 if (document.readyState === 'loading') { |
| 120 window.addEventListener('load', done); | 122 window.addEventListener('load', done); |
| 121 } else { | 123 } else { |
| 122 done(); | 124 done(); |
| 123 } | 125 } |
| 124 }); | 126 }); |
| OLD | NEW |