Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library http.test.io.streamed_request_test; | 5 library http.test.io.streamed_request_test; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 return startServer().then((_) { | 48 return startServer().then((_) { |
| 49 var request = new http.StreamedRequest( | 49 var request = new http.StreamedRequest( |
| 50 'GET', serverUrl.resolve('/no-content-length')); | 50 'GET', serverUrl.resolve('/no-content-length')); |
| 51 request.sink.close(); | 51 request.sink.close(); |
| 52 return request.send(); | 52 return request.send(); |
| 53 }).then((response) { | 53 }).then((response) { |
| 54 expect(UTF8.decodeStream(response.stream), completion(equals('body'))); | 54 expect(UTF8.decodeStream(response.stream), completion(equals('body'))); |
| 55 }).whenComplete(stopServer); | 55 }).whenComplete(stopServer); |
| 56 }); | 56 }); |
| 57 | 57 |
| 58 } | 58 } |
|
kevmoo
2014/06/12 20:25:33
end with newline
| |
| OLD | NEW |