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

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

Issue 48133002: Remove deprecated dart:utf library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged to head. Created 7 years, 2 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/record_and_replay.dart ('k') | utils/tests/string_encoding/unicode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/utils.dart
diff --git a/tools/testing/dart/utils.dart b/tools/testing/dart/utils.dart
index 1c54b23a609c3f60fa35bc8e49bb7666eb961aaa..a1a8d332894ce4a2762587e2ba2ce4ac27207251 100644
--- a/tools/testing/dart/utils.dart
+++ b/tools/testing/dart/utils.dart
@@ -7,7 +7,7 @@ library utils;
import 'dart:async';
import 'dart:io';
import 'dart:math' show min;
-import 'dart:utf' as utf;
+import 'dart:convert';
part 'legacy_path.dart';
@@ -117,14 +117,14 @@ int findBytes(List<int> data, List<int> pattern, [int startPos=0]) {
}
List<int> encodeUtf8(String string) {
- return utf.encodeUtf8(string);
+ return UTF8.encode(string);
}
// TODO(kustermann,ricow): As soon we have a debug log we should log
// invalid utf8-encoded input to the log.
// Currently invalid bytes will be replaced by a replacement character.
String decodeUtf8(List<int> bytes) {
- return utf.decodeUtf8(bytes);
+ return UTF8.decode(bytes, allowMalformed: true);
}
class Locations {
« no previous file with comments | « tools/testing/dart/record_and_replay.dart ('k') | utils/tests/string_encoding/unicode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698