Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 unit test library for running groups of tests in a browser, instead of the | 6 * A unit test library for running groups of tests in a browser, instead of the |
| 7 * entire test file. This is especially used for large tests files that have | 7 * entire test file. This is especially used for large tests files that have |
| 8 * many subtests, so we can mark groups as failing at a finer granularity than | 8 * many subtests, so we can mark groups as failing at a finer granularity than |
| 9 * the entire test file. | 9 * the entire test file. |
| 10 * | 10 * |
| 11 * To use, import this file, and call [useHtmlIndividualConfiguration] at the | 11 * To use, import this file, and call [useHtmlIndividualConfiguration] at the |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 41 if(unittest.testCases.isEmpty) { | 41 if(unittest.testCases.isEmpty) { |
| 42 throw 'No tests match group "$testGroupName".'; | 42 throw 'No tests match group "$testGroupName".'; |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 super.onStart(); | 46 super.onStart(); |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) { | 50 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) { |
| 51 if (unittest.config != null) return; | 51 unittest.unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonN otLayout; |
|
Siggi Cherem (dart-lang)
2013/03/27 21:05:58
nit: 80 col
| |
| 52 unittest.configure(new HtmlIndividualConfiguration(isLayoutTest)); | |
| 53 } | 52 } |
| 53 | |
| 54 final _singletonLayout = new HtmlIndividualConfiguration(true); | |
| 55 final _singletonNotLayout = new HtmlIndividualConfiguration(false); | |
| OLD | NEW |