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

Side by Side Diff: tests/standalone/io/http_client_connect_test.dart

Issue 14150002: Remove StreamSink(replaced by EventSink) and make IOSink extend EventSink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 15 matching lines...) Expand all
26 (data) {}, 26 (data) {},
27 onDone: server.close); 27 onDone: server.close);
28 }); 28 });
29 }); 29 });
30 } 30 }
31 31
32 void testGetDataRequest() { 32 void testGetDataRequest() {
33 HttpServer.bind().then((server) { 33 HttpServer.bind().then((server) {
34 var data = "lalala".codeUnits; 34 var data = "lalala".codeUnits;
35 server.listen((request) { 35 server.listen((request) {
36 request.response.writeBytes(data); 36 request.response.add(data);
37 request.pipe(request.response); 37 request.pipe(request.response);
38 }); 38 });
39 39
40 var client = new HttpClient(); 40 var client = new HttpClient();
41 client.get("127.0.0.1", server.port, "/") 41 client.get("127.0.0.1", server.port, "/")
42 .then((request) => request.close()) 42 .then((request) => request.close())
43 .then((response) { 43 .then((response) {
44 int count = 0; 44 int count = 0;
45 response.listen( 45 response.listen(
46 (data) => count += data.length, 46 (data) => count += data.length,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 127
128 void main() { 128 void main() {
129 testGetEmptyRequest(); 129 testGetEmptyRequest();
130 testGetDataRequest(); 130 testGetDataRequest();
131 testGetInvalidHost(); 131 testGetInvalidHost();
132 testGetServerClose(); 132 testGetServerClose();
133 testGetDataServerClose(); 133 testGetDataServerClose();
134 testPostEmptyRequest(); 134 testPostEmptyRequest();
135 } 135 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_body_test.dart ('k') | tests/standalone/io/http_client_request_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698