Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: pkg/unittest/lib/html_individual_config.dart

Issue 12770017: pkg/unittest: config refactor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: per siggi's recomendations Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 24 matching lines...) Expand all
36 } catch (e) { 36 } catch (e) {
37 print('tried to match "$testGroupName"'); 37 print('tried to match "$testGroupName"');
38 print('NO_SUCH_TEST'); 38 print('NO_SUCH_TEST');
39 } 39 }
40 } 40 }
41 super.onStart(); 41 super.onStart();
42 } 42 }
43 } 43 }
44 44
45 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) { 45 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) {
46 if (unittest.config != null) return; 46 unittest.config = isLayoutTest ? _singletonLayout : _singletonNotLayout;
47 unittest.configure(new HtmlIndividualConfiguration(isLayoutTest));
48 } 47 }
48
49 final _singletonLayout = new HtmlIndividualConfiguration(true);
50 final _singletonNotLayout = new HtmlIndividualConfiguration(false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698