| Index: pkg/http/test/streamed_request_test.dart
|
| diff --git a/pkg/http/test/streamed_request_test.dart b/pkg/http/test/streamed_request_test.dart
|
| index c9e3689dc372fc6d9cb1ca76e9812c027627d04e..afe8e098fcc56cbda28b249221fc92868dbc7237 100644
|
| --- a/pkg/http/test/streamed_request_test.dart
|
| +++ b/pkg/http/test/streamed_request_test.dart
|
| @@ -23,52 +23,10 @@ void main() {
|
| expect(() => request.contentLength = -1, throwsArgumentError);
|
| });
|
|
|
| - test('controls the Content-Length header', () {
|
| - return startServer().then((_) {
|
| - var request = new http.StreamedRequest('POST', serverUrl);
|
| - request.contentLength = 10;
|
| - request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
| - request.sink.close();
|
| -
|
| - return request.send();
|
| - }).then((response) {
|
| - expect(UTF8.decodeStream(response.stream),
|
| - completion(parse(containsPair('headers',
|
| - containsPair('content-length', ['10'])))));
|
| - }).whenComplete(stopServer);
|
| - });
|
| -
|
| - test('defaults to sending no Content-Length', () {
|
| - return startServer().then((_) {
|
| - var request = new http.StreamedRequest('POST', serverUrl);
|
| - request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
| - request.sink.close();
|
| -
|
| - return request.send();
|
| - }).then((response) {
|
| - expect(UTF8.decodeStream(response.stream),
|
| - completion(parse(containsPair('headers',
|
| - isNot(contains('content-length'))))));
|
| - }).whenComplete(stopServer);
|
| - });
|
| -
|
| test('is frozen by finalize()', () {
|
| var request = new http.StreamedRequest('POST', dummyUrl);
|
| request.finalize();
|
| expect(() => request.contentLength = 10, throwsStateError);
|
| });
|
| });
|
| -
|
| - // Regression test.
|
| - test('.send() with a response with no content length', () {
|
| - return startServer().then((_) {
|
| - var request = new http.StreamedRequest(
|
| - 'GET', serverUrl.resolve('/no-content-length'));
|
| - request.sink.close();
|
| - return request.send();
|
| - }).then((response) {
|
| - expect(UTF8.decodeStream(response.stream), completion(equals('body')));
|
| - }).whenComplete(stopServer);
|
| - });
|
| -
|
| }
|
|
|