| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:io"); | 5 #import("dart:io"); |
| 6 #import("dart:isolate"); | 6 #import("dart:isolate"); |
| 7 | 7 |
| 8 class ExpectedDataOutputStream implements OutputStream { | 8 class ExpectedDataOutputStream implements OutputStream { |
| 9 ExpectedDataOutputStream(List<int> this._data, | 9 ExpectedDataOutputStream(List<int> this._data, |
| 10 int this._cutoff, | 10 int this._cutoff, |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // TODO(ajohnsen): Validate HttpServers number of connections. | 201 // TODO(ajohnsen): Validate HttpServers number of connections. |
| 202 } | 202 } |
| 203 for (int i = 1; i < response.length; i++) { | 203 for (int i = 1; i < response.length; i++) { |
| 204 bool _expectError = expectError && i < response.length - okayFrom; | 204 bool _expectError = expectError && i < response.length - okayFrom; |
| 205 runSettings(i, false, _expectError); | 205 runSettings(i, false, _expectError); |
| 206 runSettings(i, true, _expectError); | 206 runSettings(i, true, _expectError); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 testContent( | 209 testContent( |
| 210 "GET / HTTP/1.1\r\nKeep-Alive: False\r\n\r\n", | 210 "GET / HTTP/1.1\r\nKeep-Alive: False\r\n\r\n", |
| 211 "HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\nconnection: close" + | 211 "HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\nconnection: close" |
| 212 "\r\n\r\n0\r\n\r\n"); | 212 "\r\n\r\n0\r\n\r\n"); |
| 213 | 213 |
| 214 server.close(); | 214 server.close(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void main() { | 217 void main() { |
| 218 testSocketClose(); | 218 testSocketClose(); |
| 219 } | 219 } |
| OLD | NEW |