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

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

Issue 11829045: Cleaning up unittest configurations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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) 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 } 125 }
126 126
127 void onInit() { 127 void onInit() {
128 _installHandlers(); 128 _installHandlers();
129 window.postMessage('unittest-suite-wait-for-done', '*'); 129 window.postMessage('unittest-suite-wait-for-done', '*');
130 } 130 }
131 131
132 void onTestResult(TestCase testCase) {} 132 void onTestResult(TestCase testCase) {}
133 133
134 void onDone(int passed, int failed, int errors, List<TestCase> results, 134 void onSummary(int passed, int failed, int errors, List<TestCase> results,
135 String uncaughtError) { 135 String uncaughtError) {
136 _uninstallHandlers();
137 _showResultsInPage(passed, failed, errors, results, _isLayoutTest, 136 _showResultsInPage(passed, failed, errors, results, _isLayoutTest,
138 uncaughtError); 137 uncaughtError);
138 }
139
140 void onDone(bool success) {
141 _uninstallHandlers();
139 window.postMessage('unittest-suite-done', '*'); 142 window.postMessage('unittest-suite-done', '*');
140 } 143 }
141 } 144 }
142 145
143 void useHtmlConfiguration([bool isLayoutTest = false]) { 146 void useHtmlConfiguration([bool isLayoutTest = false]) {
144 configure(new HtmlConfiguration(isLayoutTest)); 147 configure(new HtmlConfiguration(isLayoutTest));
145 } 148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698