| Index: pkg/unittest/lib/html_config.dart
|
| diff --git a/pkg/unittest/lib/html_config.dart b/pkg/unittest/lib/html_config.dart
|
| index b86b3fc0686d1badc13e39a2e9976abb9ef3bd6b..e4eba0f54b2507c5445fb827d73724fec38a813c 100644
|
| --- a/pkg/unittest/lib/html_config.dart
|
| +++ b/pkg/unittest/lib/html_config.dart
|
| @@ -8,6 +8,7 @@
|
| library unittest_html_config;
|
|
|
| import 'dart:async';
|
| +import 'dart:convert';
|
| import 'dart:html';
|
| import 'unittest.dart';
|
|
|
| @@ -76,25 +77,18 @@ String _toHtml(TestCase test_) {
|
| <tr>
|
| <td>${test_.id}</td>
|
| <td class="unittest-${test_.result}">${test_.result.toUpperCase()}</td>
|
| - <td>Expectation: <a href="#testFilter=${test_.description}">${test_.description}</a>. ${_htmlEscape(test_.message)}</td>
|
| + <td>Expectation: <a href="#testFilter=${test_.description}">${test_.description}</a>. ${HTML_ESCAPE.convert(test_.message)}</td>
|
| </tr>''';
|
|
|
| if (test_.stackTrace != null) {
|
| html = '$html<tr><td></td><td colspan="2"><pre>' +
|
| - _htmlEscape(test_.stackTrace.toString()) +
|
| + HTML_ESCAPE.convert(test_.stackTrace.toString()) +
|
| '</pre></td></tr>';
|
| }
|
|
|
| return html;
|
| }
|
|
|
| -//TODO(pquitslund): Move to a common lib
|
| -String _htmlEscape(String string) {
|
| - return string.replaceAll('&', '&')
|
| - .replaceAll('<','<')
|
| - .replaceAll('>','>');
|
| -}
|
| -
|
| class HtmlConfiguration extends SimpleConfiguration {
|
| /** Whether this is run within dartium layout tests. */
|
| final bool _isLayoutTest;
|
|
|