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

Unified Diff: tests/standalone/io/http_server_response_test.dart

Issue 120163006: Fix HttpResponse::writeCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_server_response_test.dart
diff --git a/tests/standalone/io/http_server_response_test.dart b/tests/standalone/io/http_server_response_test.dart
index 3c5767ea176cec6a55951fa7c8ef1ce72c12523b..baef9ba6a6ebd6c5c13fc5fea39d6579a3b01999 100644
--- a/tests/standalone/io/http_server_response_test.dart
+++ b/tests/standalone/io/http_server_response_test.dart
@@ -288,6 +288,18 @@ void testBadHeaders() {
}
+void testWriteCharCode() {
+ testServerRequest((server, request) {
+ // Test that default is latin-1 (only 2 bytes).
+ request.response.writeCharCode(0xFF);
+ request.response.writeCharCode(0xFF);
+ request.response.close().then((_) {
+ server.close();
+ });
+ }, bytes: 2);
+}
+
+
void main() {
testResponseDone();
testResponseAddStream();
@@ -297,4 +309,5 @@ void main() {
testBadResponseClose();
testIgnoreRequestData();
testBadHeaders();
+ testWriteCharCode();
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698