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

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

Issue 10037027: unittest step2: bye bye to multiple entrypoints for unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « lib/unittest/html_config.dart ('k') | lib/unittest/shared.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) 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 6
6 /** Creates a table showing tests results in HTML. */ 7 /** Creates a table showing tests results in HTML. */
7 void _showResultsInPage(int testsPassed, int testsFailed, int testsErrors, 8 void _showResultsInPage(int testsPassed, int testsFailed, int testsErrors,
8 List<TestCase> results, isLayoutTest) { 9 List<TestCase> results, isLayoutTest) {
9 if (isLayoutTest && (testsPassed == results.length)) { 10 if (isLayoutTest && (testsPassed == results.length)) {
10 document.body.innerHTML = "PASS"; 11 document.body.innerHTML = "PASS";
11 } else { 12 } else {
12 var newBody = new StringBuffer(); 13 var newBody = new StringBuffer();
13 newBody.add("<table class='unittest-table'><tbody>"); 14 newBody.add("<table class='unittest-table'><tbody>");
14 newBody.add(testsPassed == results.length 15 newBody.add(testsPassed == results.length
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 62
62 return html; 63 return html;
63 } 64 }
64 65
65 //TODO(pquitslund): Move to a common lib 66 //TODO(pquitslund): Move to a common lib
66 String _htmlEscape(String string) { 67 String _htmlEscape(String string) {
67 return string.replaceAll('&', '&amp;') 68 return string.replaceAll('&', '&amp;')
68 .replaceAll('<','&lt;') 69 .replaceAll('<','&lt;')
69 .replaceAll('>','&gt;'); 70 .replaceAll('>','&gt;');
70 } 71 }
OLDNEW
« no previous file with comments | « lib/unittest/html_config.dart ('k') | lib/unittest/shared.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698