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

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

Issue 72663005: Clean up HttpHeaders to always have them in a consistent state. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup. Created 7 years, 1 month 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
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // server sets a content length so the persistent connection can be 121 // server sets a content length so the persistent connection can be
122 // used. 122 // used.
123 void testHttp10KeepAlive() { 123 void testHttp10KeepAlive() {
124 HttpServer.bind("127.0.0.1", 0).then((server) { 124 HttpServer.bind("127.0.0.1", 0).then((server) {
125 server.listen( 125 server.listen(
126 (HttpRequest request) { 126 (HttpRequest request) {
127 Expect.isNull(request.headers.value('content-length')); 127 Expect.isNull(request.headers.value('content-length'));
128 Expect.equals(-1, request.contentLength); 128 Expect.equals(-1, request.contentLength);
129 var response = request.response; 129 var response = request.response;
130 response.contentLength = 1; 130 response.contentLength = 1;
131 response.persistentConnection = true;
131 Expect.equals("1.0", request.protocolVersion); 132 Expect.equals("1.0", request.protocolVersion);
132 response.write("Z"); 133 response.write("Z");
133 response.close(); 134 response.close();
134 }, 135 },
135 onError: (e, trace) { 136 onError: (e, trace) {
136 String msg = "Unexpected error $e"; 137 String msg = "Unexpected error $e";
137 if (trace != null) msg += "\nStackTrace: $trace"; 138 if (trace != null) msg += "\nStackTrace: $trace";
138 Expect.fail(msg); 139 Expect.fail(msg);
139 }); 140 });
140 141
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 }); 221 });
221 } 222 }
222 223
223 224
224 void main() { 225 void main() {
225 testHttp10NoKeepAlive(); 226 testHttp10NoKeepAlive();
226 testHttp10ServerClose(); 227 testHttp10ServerClose();
227 testHttp10KeepAlive(); 228 testHttp10KeepAlive();
228 testHttp10KeepAliveServerCloses(); 229 testHttp10KeepAliveServerCloses();
229 } 230 }
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