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

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

Issue 2650583005: Revert "Make HTTP headers use a growing buffer, not a fixed-size 8K one." (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « tests/standalone/io/http_client_request_test.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 // 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 // OtherResources=http_server_response_test.dart 9 // OtherResources=http_server_response_test.dart
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 .fold(0, (s, b) => s + b.length) 274 .fold(0, (s, b) => s + b.length)
275 .then((bytes) { 275 .then((bytes) {
276 Expect.equals(8, bytes); 276 Expect.equals(8, bytes);
277 server.close(); 277 server.close();
278 }); 278 });
279 }); 279 });
280 }); 280 });
281 } 281 }
282 282
283 283
284 void testBadHeaders() {
285 testServerRequest((server, request) {
286 var value = "a";
287 for (int i = 0; i < 8 * 1024; i++) {
288 value += 'a';
289 }
290 request.response.headers.set('name', value);
291 request.response.close().catchError((error) {
292 server.close();
293 }, test: (e) => e is HttpException);
294 });
295 }
296
297
284 void testWriteCharCode() { 298 void testWriteCharCode() {
285 testServerRequest((server, request) { 299 testServerRequest((server, request) {
286 // Test that default is latin-1 (only 2 bytes). 300 // Test that default is latin-1 (only 2 bytes).
287 request.response.writeCharCode(0xFF); 301 request.response.writeCharCode(0xFF);
288 request.response.writeCharCode(0xFF); 302 request.response.writeCharCode(0xFF);
289 request.response.close().then((_) { 303 request.response.close().then((_) {
290 server.close(); 304 server.close();
291 }); 305 });
292 }, bytes: 2); 306 }, bytes: 2);
293 } 307 }
294 308
295 309
296 void main() { 310 void main() {
297 testResponseDone(); 311 testResponseDone();
298 testResponseAddStream(); 312 testResponseAddStream();
299 testResponseAddStreamClosed(); 313 testResponseAddStreamClosed();
300 testResponseAddClosed(); 314 testResponseAddClosed();
301 testBadResponseAdd(); 315 testBadResponseAdd();
302 testBadResponseClose(); 316 testBadResponseClose();
303 testIgnoreRequestData(); 317 testIgnoreRequestData();
318 testBadHeaders();
304 testWriteCharCode(); 319 testWriteCharCode();
305 } 320 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_client_request_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698