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

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

Issue 18052029: Use package:stack_trace in unittest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review change. Created 7 years, 5 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
« no previous file with comments | « pkg/unittest/lib/html_config.dart ('k') | pkg/unittest/lib/interactive_html_config.dart » ('j') | no next file with comments »
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 * Provides enhanced HTML output with collapsible group headers 8 * Provides enhanced HTML output with collapsible group headers
9 * and other at-a-glance information about the test results. 9 * and other at-a-glance information about the test results.
10 */ 10 */
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 if (!test_.isComplete) { 264 if (!test_.isComplete) {
265 addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.'); 265 addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.');
266 return; 266 return;
267 } 267 }
268 268
269 addRowElement('${test_.id}', '${test_.result.toUpperCase()}', 269 addRowElement('${test_.id}', '${test_.result.toUpperCase()}',
270 '${test_.description}. ${_htmlEscape(test_.message)}'); 270 '${test_.description}. ${_htmlEscape(test_.message)}');
271 271
272 if (test_.stackTrace != null) { 272 if (test_.stackTrace != null) {
273 addRowElement('', '', '<pre>${_htmlEscape(test_.stackTrace)}</pre>'); 273 addRowElement('', '',
274 '<pre>${_htmlEscape(test_.stackTrace.toString())}</pre>');
274 } 275 }
275 } 276 }
276 277
277 278
278 static bool get _isIE => window.navigator.userAgent.contains('MSIE'); 279 static bool get _isIE => window.navigator.userAgent.contains('MSIE');
279 280
280 String get _htmlTestCSS => 281 String get _htmlTestCSS =>
281 ''' 282 '''
282 body{ 283 body{
283 font-size: 14px; 284 font-size: 14px;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 417
417 '''; 418 ''';
418 } 419 }
419 420
420 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { 421 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) {
421 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout; 422 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout;
422 } 423 }
423 424
424 final _singletonLayout = new HtmlEnhancedConfiguration(true); 425 final _singletonLayout = new HtmlEnhancedConfiguration(true);
425 final _singletonNotLayout = new HtmlEnhancedConfiguration(false); 426 final _singletonNotLayout = new HtmlEnhancedConfiguration(false);
OLDNEW
« no previous file with comments | « pkg/unittest/lib/html_config.dart ('k') | pkg/unittest/lib/interactive_html_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698