| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; |
| 5 import 'dart:math'; | 6 import 'dart:math'; |
| 6 | 7 |
| 7 part "../../../sdk/lib/io/http_parser.dart"; | 8 part "../../../sdk/lib/io/http_parser.dart"; |
| 8 part "../../../sdk/lib/io/mime_multipart_parser.dart"; | 9 part "../../../sdk/lib/io/mime_multipart_parser.dart"; |
| 9 | 10 |
| 10 void testParse(String message, | 11 void testParse(String message, |
| 11 String boundary, | 12 String boundary, |
| 12 [List<Map> expectedHeaders, | 13 [List<Map> expectedHeaders, |
| 13 List expectedParts]) { | 14 List expectedParts]) { |
| 14 _MimeMultipartParser parser; | 15 _MimeMultipartParser parser; |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 \r | 332 \r |
| 332 Body2\r | 333 Body2\r |
| 333 --xxx\r\n"""; | 334 --xxx\r\n"""; |
| 334 Expect.throws(() => testParse(message, "xxx", null, [null, null])); | 335 Expect.throws(() => testParse(message, "xxx", null, [null, null])); |
| 335 } | 336 } |
| 336 | 337 |
| 337 void main() { | 338 void main() { |
| 338 testParseValid(); | 339 testParseValid(); |
| 339 testParseInvalid(); | 340 testParseInvalid(); |
| 340 } | 341 } |
| OLD | NEW |