| 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 | 5 |
| 6 #import("dart:io"); | 6 #import("dart:io"); |
| 7 | 7 |
| 8 void testRequestResponseClientCloses( | 8 void testRequestResponseClientCloses( |
| 9 int totalConnections, int closeStatus, String closeReason) { | 9 int totalConnections, int closeStatus, String closeReason) { |
| 10 HttpServer server = new HttpServer(); | 10 HttpServer server = new HttpServer(); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 Expect.equals(HttpStatus.BAD_REQUEST, response.statusCode); | 143 Expect.equals(HttpStatus.BAD_REQUEST, response.statusCode); |
| 144 client.shutdown(); | 144 client.shutdown(); |
| 145 server.close(); | 145 server.close(); |
| 146 }; | 146 }; |
| 147 } | 147 } |
| 148 | 148 |
| 149 main() { | 149 main() { |
| 150 testRequestResponseClientCloses(2, null, null); | 150 testRequestResponseClientCloses(2, null, null); |
| 151 testRequestResponseClientCloses(2, 3001, null); | 151 testRequestResponseClientCloses(2, 3001, null); |
| 152 testRequestResponseClientCloses(2, 3002, "Got tired"); | 152 testRequestResponseClientCloses(2, 3002, "Got tired"); |
| 153 testRequestResponseServerCloses(1, null, null); | 153 testRequestResponseServerCloses(2, null, null); |
| 154 testRequestResponseServerCloses(2, 3001, null); | 154 testRequestResponseServerCloses(2, 3001, null); |
| 155 testRequestResponseServerCloses(2, 3002, "Got tired"); | 155 testRequestResponseServerCloses(2, 3002, "Got tired"); |
| 156 testNoUpgrade(); | 156 testNoUpgrade(); |
| 157 testUsePOST(); | 157 testUsePOST(); |
| 158 } | 158 } |
| OLD | NEW |