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

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

Issue 11785026: Fixing unittest: ensure 'wait-until-done' is posted before we reach the end of (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
« no previous file with comments | « no previous file | pkg/unittest/lib/src/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) 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 * 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 final String _CSSID = '_unittestcss_'; 59 final String _CSSID = '_unittestcss_';
60 60
61 var cssElement = document.head.query('#${_CSSID}'); 61 var cssElement = document.head.query('#${_CSSID}');
62 if (cssElement == null){ 62 if (cssElement == null){
63 document.head.elements.add(new Element.html( 63 document.head.elements.add(new Element.html(
64 '<style id="${_CSSID}"></style>')); 64 '<style id="${_CSSID}"></style>'));
65 cssElement = document.head.query('#${_CSSID}'); 65 cssElement = document.head.query('#${_CSSID}');
66 } 66 }
67 67
68 cssElement.innerHtml = _htmlTestCSS; 68 cssElement.innerHtml = _htmlTestCSS;
69 window.postMessage('unittest-suite-wait-for-done', '*');
69 } 70 }
70 71
71 void onStart() { 72 void onStart() {
72 window.postMessage('unittest-suite-wait-for-done', '*');
73 // Listen for uncaught errors. 73 // Listen for uncaught errors.
74 window.on.error.add(_onErrorClosure); 74 window.on.error.add(_onErrorClosure);
75 } 75 }
76 76
77 void onTestResult(TestCase testCase) {} 77 void onTestResult(TestCase testCase) {}
78 78
79 void onDone(int passed, int failed, int errors, List<TestCase> results, 79 void onDone(int passed, int failed, int errors, List<TestCase> results,
80 String uncaughtError) { 80 String uncaughtError) {
81 _uninstallHandlers(); 81 _uninstallHandlers();
82 82
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 .unittest-row-description 406 .unittest-row-description
407 { 407 {
408 } 408 }
409 409
410 '''; 410 ''';
411 } 411 }
412 412
413 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { 413 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) {
414 configure(new HtmlEnhancedConfiguration(isLayoutTest)); 414 configure(new HtmlEnhancedConfiguration(isLayoutTest));
415 } 415 }
OLDNEW
« no previous file with comments | « no previous file | pkg/unittest/lib/src/config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698