| OLD | NEW |
| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 te.elements.add(new Element.html(""" | 185 te.elements.add(new Element.html(""" |
| 186 <div> | 186 <div> |
| 187 <div id='${safeGroup}' | 187 <div id='${safeGroup}' |
| 188 class='unittest-group ${safeGroup} test${safeGroup}'> | 188 class='unittest-group ${safeGroup} test${safeGroup}'> |
| 189 <div ${_isIE ? "style='display:inline-block' ": ""} | 189 <div ${_isIE ? "style='display:inline-block' ": ""} |
| 190 class='unittest-row-status'> | 190 class='unittest-row-status'> |
| 191 <div class='$passFailClass'></div> | 191 <div class='$passFailClass'></div> |
| 192 </div> | 192 </div> |
| 193 <div ${_isIE ? "style='display:inline-block' ": ""}> | 193 <div ${_isIE ? "style='display:inline-block' ": ""}> |
| 194 ${test_.currentGroup}</div> | 194 ${test_.currentGroup}</div> |
| 195 |
| 195 <div ${_isIE ? "style='display:inline-block' ": ""}> | 196 <div ${_isIE ? "style='display:inline-block' ": ""}> |
| 196 (${groupTestPassedCount}/${groupTotalTestCount})</div> | 197 (${groupTestPassedCount}/${groupTotalTestCount})</div> |
| 197 </div> | 198 </div> |
| 198 </div>""")); | 199 </div>""")); |
| 199 | 200 |
| 200 // 'safeGroup' could be empty | 201 // 'safeGroup' could be empty |
| 201 var grp = (safeGroup == '') ? null : te.query('#${safeGroup}'); | 202 var grp = (safeGroup == '') ? null : te.query('#${safeGroup}'); |
| 202 if (grp != null){ | 203 if (grp != null){ |
| 203 grp.on.click.add((_){ | 204 grp.on.click.add((_){ |
| 204 var row = document.query('.unittest-row-${safeGroup}'); | 205 var row = document.query('.unittest-row-${safeGroup}'); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 .unittest-row-description | 406 .unittest-row-description |
| 406 { | 407 { |
| 407 } | 408 } |
| 408 | 409 |
| 409 '''; | 410 '''; |
| 410 } | 411 } |
| 411 | 412 |
| 412 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { | 413 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { |
| 413 configure(new HtmlEnhancedConfiguration(isLayoutTest)); | 414 configure(new HtmlEnhancedConfiguration(isLayoutTest)); |
| 414 } | 415 } |
| OLD | NEW |