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 library unittest_html_config; | 8 library unittest_html_config; |
9 | 9 |
10 import 'dart:html'; | 10 import 'dart:html'; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 uncaughtError); | 137 uncaughtError); |
138 } | 138 } |
139 | 139 |
140 void onDone(bool success) { | 140 void onDone(bool success) { |
141 _uninstallHandlers(); | 141 _uninstallHandlers(); |
142 window.postMessage('unittest-suite-done', '*'); | 142 window.postMessage('unittest-suite-done', '*'); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 void useHtmlConfiguration([bool isLayoutTest = false]) { | 146 void useHtmlConfiguration([bool isLayoutTest = false]) { |
| 147 if (config != null) return; |
147 configure(new HtmlConfiguration(isLayoutTest)); | 148 configure(new HtmlConfiguration(isLayoutTest)); |
148 } | 149 } |
OLD | NEW |