Chromium Code Reviews| 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 // Setup for WebKit JavaScript tests | 15 // Setup for WebKit JavaScript tests |
| 16 if (self.testRunner) { | 16 if (self.testRunner) { |
| 17 testRunner.dumpAsText(); | 17 testRunner.dumpAsText(); |
| 18 testRunner.waitUntilDone(); | 18 testRunner.waitUntilDone(); |
| 19 testRunner.setCanOpenWindows(); | |
|
jsbell
2015/07/01 22:33:15
And keep all copies in sync...
| |
| 20 testRunner.setCloseRemainingWindowsWhenComplete(true); | |
| 19 } | 21 } |
| 20 | 22 |
| 21 // Function used to convert the test status code into | 23 // Function used to convert the test status code into |
| 22 // the corresponding string | 24 // the corresponding string |
| 23 function convertResult(resultStatus) { | 25 function convertResult(resultStatus) { |
| 24 if(resultStatus == 0) | 26 if(resultStatus == 0) |
| 25 return("PASS"); | 27 return("PASS"); |
| 26 else if(resultStatus == 1) | 28 else if(resultStatus == 1) |
| 27 return("FAIL"); | 29 return("FAIL"); |
| 28 else if(resultStatus == 2) | 30 else if(resultStatus == 2) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 if (self.testRunner) | 122 if (self.testRunner) |
| 121 testRunner.notifyDone(); | 123 testRunner.notifyDone(); |
| 122 } | 124 } |
| 123 | 125 |
| 124 if (document.readyState === 'loading') { | 126 if (document.readyState === 'loading') { |
| 125 window.addEventListener('load', done); | 127 window.addEventListener('load', done); |
| 126 } else { | 128 } else { |
| 127 done(); | 129 done(); |
| 128 } | 130 } |
| 129 }); | 131 }); |
| OLD | NEW |