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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // VMOptions=
6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write
9
10 import 'dart:io';
11
12 void main() {
13 HttpServer.bind().then((server) {
14 server.listen((request) {
15 request.response
16 ..addString("first line\n")
17 ..addString("")
18 ..addString("second line\n")
19 ..close();
20 });
21
22 HttpClient client = new HttpClient();
23 client.get("127.0.0.1", server.port, "/")
24 .then((HttpClientRequest request) {
25 return request.close();
26 })
27 .then((HttpClientResponse response) {
28 List<int> body = new List();
29 response.listen(body.addAll,
30 onDone: () {
31 Expect.equals("first line\nsecond line\n",
32 new String.fromCharCodes(body));
33 server.close();
34 });
35 });
36 });
37 }
OLDNEW
« 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