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

Unified Diff: tools/testing/dart/test_progress.dart

Issue 11883033: Fixed utf8 encoding/decoding issues in the testing scripts (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index c74025e8a59461f99eb3535b5944a28786f76dff..cf3642454e05ba63e34d7463c01cb0968165d4f0 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -5,10 +5,11 @@
library test_progress;
import "dart:io";
+import "http_server.dart" as http_server;
+import "status_file_parser.dart";
import "test_runner.dart";
import "test_suite.dart";
-import "status_file_parser.dart";
-import "http_server.dart" as http_server;
+import "utils.dart";
class ProgressIndicator {
ProgressIndicator(this._startTime, this._printTiming)
@@ -188,13 +189,13 @@ class ProgressIndicator {
output.add('DRT pixel test failed! stdout is not printed because it '
'contains binary data!');
} else {
- output.add(new String.fromCharCodes(test.lastCommandOutput.stdout));
+ output.add(decodeUtf8(test.lastCommandOutput.stdout));
}
}
if (!test.lastCommandOutput.stderr.isEmpty) {
output.add('');
output.add('stderr:');
- output.add(new String.fromCharCodes(test.lastCommandOutput.stderr));
+ output.add(decodeUtf8(test.lastCommandOutput.stderr));
}
if (test is BrowserTestCase) {
// Additional command for rerunning the steps locally after the fact.
@@ -336,7 +337,7 @@ class ColorProgressIndicator extends CompactIndicator {
addColorWrapped(List<int> codes, String string, int color) {
codes.add(27);
codes.addAll('[${color}m'.charCodes);
- codes.addAll(string.charCodes);
+ codes.addAll(encodeUtf8(string));
codes.add(27);
codes.addAll('[0m'.charCodes);
}
@@ -360,7 +361,7 @@ class ColorProgressIndicator extends CompactIndicator {
String _header(String header) {
var result = [];
addColorWrapped(result, header, BOLD);
- return new String.fromCharCodes(result);
+ return decodeUtf8(result);
}
}
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698