| 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 * |
| 11 * For more documentation about the callback functions and the | 11 * For more documentation about the callback functions and the |
| 12 * parameters they are called with see testharness.js | 12 * parameters they are called with see testharness.js |
| 13 */ | 13 */ |
| 14 | 14 |
| 15 (function() { | 15 (function() { |
| 16 | 16 |
| 17 // Setup for WebKit JavaScript tests | 17 // Setup for WebKit JavaScript tests |
| 18 if (self.testRunner) { | 18 if (self.testRunner) { |
| 19 testRunner.dumpAsText(); | 19 testRunner.dumpAsText(); |
| 20 testRunner.waitUntilDone(); | 20 testRunner.waitUntilDone(); |
| 21 testRunner.setCanOpenWindows(); | 21 testRunner.setCanOpenWindows(); |
| 22 testRunner.setCloseRemainingWindowsWhenComplete(true); | 22 testRunner.setCloseRemainingWindowsWhenComplete(true); |
| 23 testRunner.setDumpJavaScriptDialogs(false); |
| 23 } | 24 } |
| 24 | 25 |
| 25 // Disable the default output of testharness.js. The default output formats | 26 // Disable the default output of testharness.js. The default output formats |
| 26 // test results into an HTML table. When that table is dumped as text, no | 27 // test results into an HTML table. When that table is dumped as text, no |
| 27 // spacing between cells is preserved, and it is therefore not readable. By | 28 // spacing between cells is preserved, and it is therefore not readable. By |
| 28 // setting output to false, the HTML table will not be created. | 29 // setting output to false, the HTML table will not be created. |
| 29 setup({"output":false}); | 30 setup({"output":false}); |
| 30 | 31 |
| 31 // Function used to convert the test status code into the corresponding | 32 // Function used to convert the test status code into the corresponding |
| 32 // string | 33 // string |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // another completion callback might generate more results. So, we | 233 // another completion callback might generate more results. So, we |
| 233 // don't dump the results immediately. | 234 // don't dump the results immediately. |
| 234 setTimeout(done, 0); | 235 setTimeout(done, 0); |
| 235 } else { | 236 } else { |
| 236 // Parsing the test HTML isn't finished yet. | 237 // Parsing the test HTML isn't finished yet. |
| 237 window.addEventListener('load', done); | 238 window.addEventListener('load', done); |
| 238 } | 239 } |
| 239 }); | 240 }); |
| 240 | 241 |
| 241 })(); | 242 })(); |
| OLD | NEW |