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

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

Issue 14055003: Remove HttpClientRequest.response, as it's identical to HttpClientRequest.done. (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
« no previous file with comments | « tests/standalone/io/http_headers_state_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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "dart:async"; 6 import "dart:async";
7 import "dart:io"; 7 import "dart:io";
8 import "dart:uri"; 8 import "dart:uri";
9 9
10 class Server { 10 class Server {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 }); 98 });
99 }); 99 });
100 // Special handling of Content-Length and Via. 100 // Special handling of Content-Length and Via.
101 clientRequest.contentLength = request.contentLength; 101 clientRequest.contentLength = request.contentLength;
102 List<String> via = request.headers[HttpHeaders.VIA]; 102 List<String> via = request.headers[HttpHeaders.VIA];
103 String viaPrefix = via == null ? "" : "${via[0]}, "; 103 String viaPrefix = via == null ? "" : "${via[0]}, ";
104 clientRequest.headers.add( 104 clientRequest.headers.add(
105 HttpHeaders.VIA, "${viaPrefix}1.1 localhost:$port"); 105 HttpHeaders.VIA, "${viaPrefix}1.1 localhost:$port");
106 // Copy all content. 106 // Copy all content.
107 request.pipe(clientRequest); 107 return request.pipe(clientRequest);
108 return clientRequest.response;
109 }) 108 })
110 .then((HttpClientResponse clientResponse) { 109 .then((HttpClientResponse clientResponse) {
111 clientResponse.pipe(request.response); 110 clientResponse.pipe(request.response);
112 }); 111 });
113 }); 112 });
114 }); 113 });
115 return x.future; 114 return x.future;
116 } 115 }
117 116
118 void shutdown() { 117 void shutdown() {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 InitializeSSL(); 412 InitializeSSL();
414 testInvalidProxy(); 413 testInvalidProxy();
415 testDirectProxy(); 414 testDirectProxy();
416 testProxy(); 415 testProxy();
417 testProxyChain(); 416 testProxyChain();
418 testProxyFromEnviroment(); 417 testProxyFromEnviroment();
419 // This test is not normally run. It can be used for locally testing 418 // This test is not normally run. It can be used for locally testing
420 // with a real proxy server (e.g. Apache). 419 // with a real proxy server (e.g. Apache).
421 //testRealProxy(); 420 //testRealProxy();
422 } 421 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_headers_state_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698