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

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

Issue 185543004: Merge all http-outgoing transfomers into _HttpOutgoing, including simpler(better) buffering. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 6 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/io_sink.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // (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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 Socket.connect("127.0.0.1", server.port).then((socket) { 43 Socket.connect("127.0.0.1", server.port).then((socket) {
44 socket.write("GET / HTTP/1.0\r\n\r\n"); 44 socket.write("GET / HTTP/1.0\r\n\r\n");
45 45
46 List<int> response = []; 46 List<int> response = [];
47 socket.listen( 47 socket.listen(
48 response.addAll, 48 response.addAll,
49 onDone: () { 49 onDone: () {
50 count++; 50 count++;
51 socket.destroy(); 51 socket.destroy();
52 String s = new String.fromCharCodes(response).toLowerCase(); 52 String s = new String.fromCharCodes(response).toLowerCase();
53 Expect.isTrue(s.indexOf("\r\ncontent-length: 1\r\n") > 0);
54 Expect.equals(-1, s.indexOf("keep-alive")); 53 Expect.equals(-1, s.indexOf("keep-alive"));
55 if (count < 10) { 54 if (count < 10) {
56 makeRequest(); 55 makeRequest();
57 } else { 56 } else {
58 server.close(); 57 server.close();
59 } 58 }
60 }); 59 });
61 }); 60 });
62 } 61 }
63 makeRequest(); 62 makeRequest();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 }); 220 });
222 } 221 }
223 222
224 223
225 void main() { 224 void main() {
226 testHttp10NoKeepAlive(); 225 testHttp10NoKeepAlive();
227 testHttp10ServerClose(); 226 testHttp10ServerClose();
228 testHttp10KeepAlive(); 227 testHttp10KeepAlive();
229 testHttp10KeepAliveServerCloses(); 228 testHttp10KeepAliveServerCloses();
230 } 229 }
OLDNEW
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698