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

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

Issue 12890002: Tweaking html_config to stabilize location test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | no next file » | 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 /** 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 <span class='unittest-pass'>${passed} passed</span>, 46 <span class='unittest-pass'>${passed} passed</span>,
47 <span class='unittest-fail'>${failed} failed</span> 47 <span class='unittest-fail'>${failed} failed</span>
48 <span class='unittest-error'> 48 <span class='unittest-error'>
49 ${errors + (uncaughtError == null ? 0 : 1)} errors</span> 49 ${errors + (uncaughtError == null ? 0 : 1)} errors</span>
50 </td></tr>"""); 50 </td></tr>""");
51 } 51 }
52 newBody.write("</tbody></table>"); 52 newBody.write("</tbody></table>");
53 document.body.innerHtml = newBody.toString(); 53 document.body.innerHtml = newBody.toString();
54 54
55 window.onHashChange.listen((_) { 55 window.onHashChange.listen((_) {
56 window.location.reload(); 56 if (window.location.hash != null &&
57 window.location.hash.contains('testFilter')) {
gram 2013/03/15 16:51:41 Again, please add a comment.
58 window.location.reload();
59 }
57 }); 60 });
58 } 61 }
59 } 62 }
60 63
61 String _toHtml(TestCase test_) { 64 String _toHtml(TestCase test_) {
62 if (!test_.isComplete) { 65 if (!test_.isComplete) {
63 return ''' 66 return '''
64 <tr> 67 <tr>
65 <td>${test_.id}</td> 68 <td>${test_.id}</td>
66 <td class="unittest-error">NO STATUS</td> 69 <td class="unittest-error">NO STATUS</td>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void onDone(bool success) { 159 void onDone(bool success) {
157 _uninstallHandlers(); 160 _uninstallHandlers();
158 window.postMessage('unittest-suite-done', '*'); 161 window.postMessage('unittest-suite-done', '*');
159 } 162 }
160 } 163 }
161 164
162 void useHtmlConfiguration([bool isLayoutTest = false]) { 165 void useHtmlConfiguration([bool isLayoutTest = false]) {
163 if (config != null) return; 166 if (config != null) return;
164 configure(new HtmlConfiguration(isLayoutTest)); 167 configure(new HtmlConfiguration(isLayoutTest));
165 } 168 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698