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

Unified Diff: tests/standalone/io/http_parser_test.dart

Issue 171403003: Clean up usage of streams in http-parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « sdk/lib/io/http_parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_parser_test.dart
diff --git a/tests/standalone/io/http_parser_test.dart b/tests/standalone/io/http_parser_test.dart
index 2c5e508bbeda748d416814b92a89b929f82f614b..5321af0b95fa8421b0ac29aa3a8b126ea7b68c69 100644
--- a/tests/standalone/io/http_parser_test.dart
+++ b/tests/standalone/io/http_parser_test.dart
@@ -70,7 +70,7 @@ class HttpParserTest {
int unparsedBytesReceived;
bool upgraded;
- controller.stream.pipe(httpParser);
+ httpParser.listenToStream(controller.stream);
var subscription = httpParser.listen((incoming) {
method = incoming.method;
uri = incoming.uri;
@@ -158,7 +158,7 @@ class HttpParserTest {
httpParser = new _HttpParser.requestParser();
controller = new StreamController(sync: true);
var port = new ReceivePort();
- controller.stream.pipe(httpParser);
+ httpParser.listenToStream(controller.stream);
var subscription = httpParser.listen((incoming) {
Expect.fail("Expected request");
});
@@ -221,7 +221,7 @@ class HttpParserTest {
httpParser = new _HttpParser.responseParser();
controller = new StreamController(sync: true);
var port = new ReceivePort();
- controller.stream.pipe(httpParser);
+ httpParser.listenToStream(controller.stream);
int doneCallCount = 0;
// Called when done parsing entire message and done parsing body.
// Only executed when both are done.
@@ -307,7 +307,7 @@ class HttpParserTest {
if (chunkSize == -1) chunkSize = requestData.length;
var port = new ReceivePort();
- controller.stream.pipe(httpParser);
+ httpParser.listenToStream(controller.stream);
var subscription = httpParser.listen((incoming) {
incoming.listen(
(data) {},
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698