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

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

Issue 75393002: unittest: A unittest with 0 test cases should PASS, fixed incorrect unittest-suite-* messages Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | pkg/unittest/lib/html_enhanced_config.dart » ('j') | tests/html/html.status » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, 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';
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void onSummary(int passed, int failed, int errors, List<TestCase> results, 161 void onSummary(int passed, int failed, int errors, List<TestCase> results,
162 String uncaughtError) { 162 String uncaughtError) {
163 _showResultsInPage(passed, failed, errors, results, _isLayoutTest, 163 _showResultsInPage(passed, failed, errors, results, _isLayoutTest,
164 uncaughtError); 164 uncaughtError);
165 } 165 }
166 166
167 void onDone(bool success) { 167 void onDone(bool success) {
168 _uninstallHandlers(); 168 _uninstallHandlers();
169 window.postMessage('unittest-suite-done', '*'); 169 if (success) {
170 window.postMessage('unittest-suite-success', '*');
171 } else {
172 window.postMessage('unittest-suite-fail', '*');
173 }
170 } 174 }
171 } 175 }
172 176
173 void useHtmlConfiguration([bool isLayoutTest = false]) { 177 void useHtmlConfiguration([bool isLayoutTest = false]) {
174 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout; 178 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout;
175 } 179 }
176 180
177 final _singletonLayout = new HtmlConfiguration(true); 181 final _singletonLayout = new HtmlConfiguration(true);
178 final _singletonNotLayout = new HtmlConfiguration(false); 182 final _singletonNotLayout = new HtmlConfiguration(false);
OLDNEW
« no previous file with comments | « no previous file | pkg/unittest/lib/html_enhanced_config.dart » ('j') | tests/html/html.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698