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

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

Issue 12770017: pkg/unittest: config refactor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed scheduled_test test 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 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 library unittest_html_config; 8 library unittest_html_config;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import 'dart:html'; 11 import 'dart:html';
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 uncaughtError); 157 uncaughtError);
158 } 158 }
159 159
160 void onDone(bool success) { 160 void onDone(bool success) {
161 _uninstallHandlers(); 161 _uninstallHandlers();
162 window.postMessage('unittest-suite-done', '*'); 162 window.postMessage('unittest-suite-done', '*');
163 } 163 }
164 } 164 }
165 165
166 void useHtmlConfiguration([bool isLayoutTest = false]) { 166 void useHtmlConfiguration([bool isLayoutTest = false]) {
167 if (config != null) return; 167 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout;
168 configure(new HtmlConfiguration(isLayoutTest));
169 } 168 }
169
170 final _singletonLayout = new HtmlConfiguration(true);
171 final _singletonNotLayout = new HtmlConfiguration(false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698