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

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

Issue 11975017: Stop treating StreamController as a Stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/lib/src/utils.dart ('k') | pkg/http/test/multipart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/mock_client_test.dart
diff --git a/pkg/http/test/mock_client_test.dart b/pkg/http/test/mock_client_test.dart
index 6467351a2057e332e71e2ea897e4b6f63bcc1588..1ffc373ee75069302dc5f834edc1b2406a86c804 100644
--- a/pkg/http/test/mock_client_test.dart
+++ b/pkg/http/test/mock_client_test.dart
@@ -35,13 +35,13 @@ void main() {
test('handles a streamed request', () {
var client = new MockClient.streaming((request, bodyStream) {
return bodyStream.bytesToString().then((bodyString) {
- var stream = new StreamController<List<int>>();
+ var controller = new StreamController<List<int>>();
async.then((_) {
- stream.add('Request body was "$bodyString"'.charCodes);
- stream.close();
+ controller.add('Request body was "$bodyString"'.charCodes);
+ controller.close();
});
- return new http.StreamedResponse(stream, 200, -1);
+ return new http.StreamedResponse(controller.stream, 200, -1);
});
});
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | pkg/http/test/multipart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698