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

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

Issue 12334119: Fix issus 8828 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 10 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/regress_8828_test.dart
diff --git a/tests/standalone/io/regress_8828_test.dart b/tests/standalone/io/regress_8828_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..be134acb64af4fe2e4ff0e81d9d9d54bb21230b7
--- /dev/null
+++ b/tests/standalone/io/regress_8828_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=
+// VMOptions=--short_socket_read
+// VMOptions=--short_socket_write
+// VMOptions=--short_socket_read --short_socket_write
+
+import 'dart:io';
+
+void main() {
+ HttpServer.bind().then((server) {
+ server.listen((request) {
+ request.response
+ ..addString("first line\n")
+ ..addString("")
+ ..addString("second line\n")
+ ..close();
+ });
+
+ HttpClient client = new HttpClient();
+ client.get("127.0.0.1", server.port, "/")
+ .then((HttpClientRequest request) {
+ return request.close();
+ })
+ .then((HttpClientResponse response) {
+ List<int> body = new List();
+ response.listen(body.addAll,
+ onDone: () {
+ Expect.equals("first line\nsecond line\n",
+ new String.fromCharCodes(body));
+ server.close();
+ });
+ });
+ });
+}
« 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