| OLD | NEW | 
|---|
| 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 | 9 | 
| 10 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 95         .then((response) { | 95         .then((response) { | 
| 96           request.response.addStream(new File(new Options().script).openRead()) | 96           request.response.addStream(new File(new Options().script).openRead()) | 
| 97               .then((response) { | 97               .then((response) { | 
| 98                 response.close(); | 98                 response.close(); | 
| 99                 response.done.then((_) => server.close()); | 99                 response.done.then((_) => server.close()); | 
| 100               }); | 100               }); | 
| 101         }); | 101         }); | 
| 102   }, bytes: bytes * 2); | 102   }, bytes: bytes * 2); | 
| 103 | 103 | 
| 104   testServerRequest((server, request) { | 104   testServerRequest((server, request) { | 
| 105     var controller = new StreamController(); | 105     var controller = new StreamController(sync: true); | 
| 106     request.response.addStream(controller.stream) | 106     request.response.addStream(controller.stream) | 
| 107         .then((response) { | 107         .then((response) { | 
| 108           response.close(); | 108           response.close(); | 
| 109           response.done.then((_) => server.close()); | 109           response.done.then((_) => server.close()); | 
| 110         }); | 110         }); | 
| 111     controller.close(); | 111     controller.close(); | 
| 112   }, bytes: 0); | 112   }, bytes: 0); | 
| 113 | 113 | 
| 114   testServerRequest((server, request) { | 114   testServerRequest((server, request) { | 
| 115     request.response.addStream(new File("__not_exitsing_file_").openRead()) | 115     request.response.addStream(new File("__not_exitsing_file_").openRead()) | 
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 273 | 273 | 
| 274 void main() { | 274 void main() { | 
| 275   testResponseDone(); | 275   testResponseDone(); | 
| 276   testResponseAddStream(); | 276   testResponseAddStream(); | 
| 277   testResponseAddStreamClosed(); | 277   testResponseAddStreamClosed(); | 
| 278   testResponseAddClosed(); | 278   testResponseAddClosed(); | 
| 279   testBadResponseAdd(); | 279   testBadResponseAdd(); | 
| 280   testBadResponseClose(); | 280   testBadResponseClose(); | 
| 281   testIgnoreRequestData(); | 281   testIgnoreRequestData(); | 
| 282 } | 282 } | 
| OLD | NEW | 
|---|