| OLD | NEW |
| 1 var consoleDiv = null; | 1 var consoleDiv = null; |
| 2 var printFullTestDetails = true; // This is optionaly switched of by test whose
tested values can differ. (see disableFullTestDetailsPrinting()) | 2 var printFullTestDetails = true; // This is optionaly switched of by test whose
tested values can differ. (see disableFullTestDetailsPrinting()) |
| 3 | 3 |
| 4 logConsole(); | 4 logConsole(); |
| 5 | 5 |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 if (window.runPixelTests) | 7 if (window.runPixelTests) |
| 8 testRunner.dumpAsTextWithPixelResults(); | 8 testRunner.dumpAsTextWithPixelResults(); |
| 9 else | 9 else |
| 10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 function waitForEventTestAndEnd(element, eventName, testFuncString) | 131 function waitForEventTestAndEnd(element, eventName, testFuncString) |
| 132 { | 132 { |
| 133 waitForEventAndTest(element, eventName, testFuncString, true); | 133 waitForEventAndTest(element, eventName, testFuncString, true); |
| 134 } | 134 } |
| 135 | 135 |
| 136 var testEnded = false; | 136 var testEnded = false; |
| 137 | 137 |
| 138 function endTest() | 138 function endTest() |
| 139 { | 139 { |
| 140 if (testEnded) |
| 141 return; |
| 140 consoleWrite("END OF TEST"); | 142 consoleWrite("END OF TEST"); |
| 141 testEnded = true; | 143 testEnded = true; |
| 142 if (window.testRunner) | 144 if (window.testRunner) |
| 143 testRunner.notifyDone(); | 145 testRunner.layoutAndPaintAsyncThen(() => testRunner.notifyDone()); |
| 144 } | 146 } |
| 145 | 147 |
| 146 function logResult(success, text) | 148 function logResult(success, text) |
| 147 { | 149 { |
| 148 if (success) | 150 if (success) |
| 149 consoleWrite(text + " <span style='color:green'>OK</span>"); | 151 consoleWrite(text + " <span style='color:green'>OK</span>"); |
| 150 else | 152 else |
| 151 consoleWrite(text + " <span style='color:red'>FAIL</span>"); | 153 consoleWrite(text + " <span style='color:red'>FAIL</span>"); |
| 152 } | 154 } |
| 153 | 155 |
| 154 function consoleWrite(text) | 156 function consoleWrite(text) |
| 155 { | 157 { |
| 156 if (testEnded) | 158 if (testEnded) |
| 157 return; | 159 return; |
| 158 logConsole().innerHTML += text + "<br>"; | 160 logConsole().innerHTML += text + "<br>"; |
| 159 } | 161 } |
| OLD | NEW |