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

Side by Side Diff: lib/unittest/html_print.dart

Issue 10558027: Mark several tests as failing after recent webkit merge and fix string concatenation in html_print.… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « no previous file | tests/html/html.status » ('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) 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 /** This file is sourced by both dom_config.dart and html_config.dart. */ 5 /** This file is sourced by both dom_config.dart and html_config.dart. */
6 6
7 /** Creates a table showing tests results in HTML. */ 7 /** Creates a table showing tests results in HTML. */
8 void _showResultsInPage(int passed, int failed, int errors, 8 void _showResultsInPage(int passed, int failed, int errors,
9 List<TestCase> results, bool isLayoutTest, String uncaughtError) { 9 List<TestCase> results, bool isLayoutTest, String uncaughtError) {
10 if (isLayoutTest && (passed == results.length) && uncaughtError == null) { 10 if (isLayoutTest && (passed == results.length) && uncaughtError == null) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 var html = ''' 60 var html = '''
61 <tr> 61 <tr>
62 <td>${test_.id}</td> 62 <td>${test_.id}</td>
63 <td class="unittest-${test_.result}">${test_.result.toUpperCase()}</td> 63 <td class="unittest-${test_.result}">${test_.result.toUpperCase()}</td>
64 <td>Expectation: ${test_.description}. ${_htmlEscape(test_.message)}</td > 64 <td>Expectation: ${test_.description}. ${_htmlEscape(test_.message)}</td >
65 </tr>'''; 65 </tr>''';
66 66
67 if (test_.stackTrace != null) { 67 if (test_.stackTrace != null) {
68 html += 68 html =
69 '<tr><td></td><td colspan="2"><pre>${_htmlEscape(test_.stackTrace)}</pre ></td></tr>'; 69 '$html<tr><td></td><td colspan="2"><pre>${_htmlEscape(test_.stackTrace)} </pre></td></tr>';
70 } 70 }
71 71
72 return html; 72 return html;
73 } 73 }
74 74
75 //TODO(pquitslund): Move to a common lib 75 //TODO(pquitslund): Move to a common lib
76 String _htmlEscape(String string) { 76 String _htmlEscape(String string) {
77 return string.replaceAll('&', '&amp;') 77 return string.replaceAll('&', '&amp;')
78 .replaceAll('<','&lt;') 78 .replaceAll('<','&lt;')
79 .replaceAll('>','&gt;'); 79 .replaceAll('>','&gt;');
80 } 80 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698