| 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 5742510e6cc181e7e7c2462077b9c4e77acee43c..0030a7dff3d7bc81c73c5de2c10772291566c9d2 100644
|
| --- a/tests/standalone/io/http_parser_test.dart
|
| +++ b/tests/standalone/io/http_parser_test.dart
|
| @@ -275,13 +275,13 @@ class HttpParserTest {
|
| }
|
|
|
| static void _testParseInvalidResponse(String response, [bool close = false]) {
|
| - _HttpParser httpParser;
|
| - bool errorCalled;
|
| - StreamController controller;
|
| + void testWrite(List<int> requestData, [int chunkSize = -1]) {
|
| + _HttpParser httpParser = new _HttpParser.responseParser();
|
| + StreamController controller = new StreamController();
|
| + bool errorCalled = false;;
|
| +
|
| + if (chunkSize == -1) chunkSize = requestData.length;
|
|
|
| - void reset() {
|
| - httpParser = new _HttpParser.responseParser();
|
| - controller = new StreamController();
|
| var port = new ReceivePort();
|
| controller.stream.pipe(httpParser);
|
| var subscription = httpParser.listen((incoming) {
|
| @@ -300,12 +300,8 @@ class HttpParserTest {
|
| port.close();
|
| Expect.isTrue(errorCalled);
|
| });
|
| - errorCalled = false;
|
| - }
|
|
|
| - void testWrite(List<int> requestData, [int chunkSize = -1]) {
|
| - if (chunkSize == -1) chunkSize = requestData.length;
|
| - reset();
|
| + errorCalled = false;
|
| for (int pos = 0;
|
| pos < requestData.length && !errorCalled;
|
| pos += chunkSize) {
|
|
|