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

Unified Diff: pkg/http/test/utils.dart

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 years, 4 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 | « pkg/http/test/request_test.dart ('k') | pkg/http_server/lib/http_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 9c6e584d4aedb6468d815b392c9be6e0503da657..7b42bec00163174423f894406575da2c02f1dfec 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -5,6 +5,7 @@
library test_utils;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
import 'dart:json' as json;
@@ -62,7 +63,7 @@ Future startServer() {
if (encodingName != null) {
outputEncoding = requiredEncodingForCharset(encodingName);
} else {
- outputEncoding = Encoding.ASCII;
+ outputEncoding = ASCII;
}
response.headers.contentType =
@@ -76,7 +77,7 @@ Future startServer() {
} else if (request.headers.contentType.charset != null) {
var encoding = requiredEncodingForCharset(
request.headers.contentType.charset);
- requestBody = decodeString(requestBodyBytes, encoding);
+ requestBody = encoding.decode(requestBodyBytes);
} else {
requestBody = requestBodyBytes;
}
« no previous file with comments | « pkg/http/test/request_test.dart ('k') | pkg/http_server/lib/http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698