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

Side by Side Diff: tests/standalone/io/http_client_request_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 | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/http_server_response_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 // 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 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 import "dart:typed_data"; 7 import "dart:typed_data";
8 8
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 request.add([0]); 101 request.add([0]);
102 request.close(); 102 request.close();
103 request.done.catchError((error) { 103 request.done.catchError((error) {
104 asyncEnd(); 104 asyncEnd();
105 }, test: (e) => e is HttpException); 105 }, test: (e) => e is HttpException);
106 return request.done; 106 return request.done;
107 }); 107 });
108 } 108 }
109 109
110 110
111 void testBadHeaders() {
112 asyncStart();
113 testClientRequest((request) {
114 var value = "a";
115 for (int i = 0; i < 8 * 1024; i++) {
116 value += 'a';
117 }
118 request.headers.set('name', value);
119 request.done.catchError((error) {
120 asyncEnd();
121 }, test: (e) => e is HttpException);
122 return request.close();
123 });
124 }
125
126
111 void main() { 127 void main() {
112 testResponseDone(); 128 testResponseDone();
113 testBadResponseAdd(); 129 testBadResponseAdd();
114 testBadResponseClose(); 130 testBadResponseClose();
131 testBadHeaders();
115 } 132 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/http_server_response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698