| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * A simple unit test library for running tests in a browser. | 6 * A simple unit test library for running tests in a browser. |
| 7 * | 7 * |
| 8 * Provides enhanced HTML output with collapsible group headers | 8 * Provides enhanced HTML output with collapsible group headers |
| 9 * and other at-a-glance information about the test results. | 9 * and other at-a-glance information about the test results. |
| 10 */ | 10 */ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 cssElement.innerHtml = _htmlTestCSS; | 76 cssElement.innerHtml = _htmlTestCSS; |
| 77 window.postMessage('unittest-suite-wait-for-done', '*'); | 77 window.postMessage('unittest-suite-wait-for-done', '*'); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void onStart() { | 80 void onStart() { |
| 81 // Listen for uncaught errors. | 81 // Listen for uncaught errors. |
| 82 _installOnErrorHandler(); | 82 _installOnErrorHandler(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void onTestResult(TestCase testCase) {} | |
| 86 | |
| 87 void onSummary(int passed, int failed, int errors, List<TestCase> results, | 85 void onSummary(int passed, int failed, int errors, List<TestCase> results, |
| 88 String uncaughtError) { | 86 String uncaughtError) { |
| 89 _showInteractiveResultsInPage(passed, failed, errors, results, | 87 _showInteractiveResultsInPage(passed, failed, errors, results, |
| 90 _isLayoutTest, uncaughtError); | 88 _isLayoutTest, uncaughtError); |
| 91 } | 89 } |
| 92 | 90 |
| 93 void onDone(bool success) { | 91 void onDone(bool success) { |
| 94 _uninstallHandlers(); | 92 _uninstallHandlers(); |
| 95 window.postMessage('unittest-suite-done', '*'); | 93 window.postMessage('unittest-suite-done', '*'); |
| 96 } | 94 } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 { | 414 { |
| 417 } | 415 } |
| 418 | 416 |
| 419 '''; | 417 '''; |
| 420 } | 418 } |
| 421 | 419 |
| 422 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { | 420 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { |
| 423 if (config != null) return; | 421 if (config != null) return; |
| 424 configure(new HtmlEnhancedConfiguration(isLayoutTest)); | 422 configure(new HtmlEnhancedConfiguration(isLayoutTest)); |
| 425 } | 423 } |
| OLD | NEW |