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

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

Issue 14660009: Implement support for application/x-www-form-urlencoded' form data in HttpBodyHandler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 7 years, 7 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_utils.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_body_test.dart
diff --git a/tests/standalone/io/http_body_test.dart b/tests/standalone/io/http_body_test.dart
index a7a5b99ba4b31f1cdab419d168d0257422b4817a..a6ea742d6f49725e123b9f588def45f1cb5d659b 100644
--- a/tests/standalone/io/http_body_test.dart
+++ b/tests/standalone/io/http_body_test.dart
@@ -113,7 +113,10 @@ void testHttpServerRequestBody() {
break;
case "form":
- Expect.equals(body.contentType.mimeType, 'multipart/form-data');
+ var mimeType = body.contentType.mimeType;
+ Expect.isTrue(
+ mimeType == 'multipart/form-data' ||
+ mimeType == 'application/x-www-form-urlencoded');
Expect.setEquals(expectedBody.keys.toSet(),
body.body.keys.toSet());
for (var key in expectedBody.keys) {
@@ -240,6 +243,13 @@ File content\r
'contentType': 'application/json',
'content': 'File content'} },
"form");
+
+ test('application/x-www-form-urlencoded',
+ '%E5%B9%B3%3D%E4%BB%AE%E5%90%8D=%26%2324179%3B%26%2320206%3B%26%'
+ '2321517%3B&b=%26%2324179%3B%26%2320206%3B%26%2321517%3B'.codeUnits,
+ { 'b' : '平仮名',
+ '平=仮名' : '平仮名'},
+ "form");
}
void main() {
« no previous file with comments | « sdk/lib/io/http_utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698