Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Unified Diff: pkg/http/test/response_test.dart

Issue 196423017: Make BaseRequest.contentType use null rather than -1 as a flag value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/http/test/mock_client_test.dart ('k') | pkg/http/test/streamed_request_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/response_test.dart
diff --git a/pkg/http/test/response_test.dart b/pkg/http/test/response_test.dart
index bc1f33d6dc1e8c562b76eb93384982afacff0a6b..52efa2c2f830b93e81f64bf58b9b090334554254 100644
--- a/pkg/http/test/response_test.dart
+++ b/pkg/http/test/response_test.dart
@@ -52,9 +52,9 @@ void main() {
test('sets body', () {
var controller = new StreamController(sync: true);
var streamResponse = new http.StreamedResponse(
- controller.stream, 200, 13);
+ controller.stream, 200, contentLength: 13);
var future = http.Response.fromStream(streamResponse)
- .then((response) => response.body);
+ .then((response) => response.body);
expect(future, completion(equals("Hello, world!")));
controller.add([72, 101, 108, 108, 111, 44, 32]);
@@ -64,9 +64,10 @@ void main() {
test('sets bodyBytes', () {
var controller = new StreamController(sync: true);
- var streamResponse = new http.StreamedResponse(controller.stream, 200, 5);
+ var streamResponse = new http.StreamedResponse(
+ controller.stream, 200, contentLength: 5);
var future = http.Response.fromStream(streamResponse)
- .then((response) => response.bodyBytes);
+ .then((response) => response.bodyBytes);
expect(future, completion(equals([104, 101, 108, 108, 111])));
controller.add([104, 101, 108, 108, 111]);
« no previous file with comments | « pkg/http/test/mock_client_test.dart ('k') | pkg/http/test/streamed_request_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698