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

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

Issue 694293002: Only lower-case ContentType's values if the name is 'charset'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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_headers.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_headers_test.dart
diff --git a/tests/standalone/io/http_headers_test.dart b/tests/standalone/io/http_headers_test.dart
index c9006ea10ac928b804bef6c28d7cf7c365f4d55c..6d2b92d3e41974c64e51394fef8ef1240b057de9 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -332,12 +332,14 @@ void testContentType() {
contentType = new ContentType("text",
"html",
- parameters: {"CHARSET": "UTF-8", "xxx": "yyy"});
- check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
+ parameters: {"CHARSET": "UTF-8", "xxx": "YYY"});
+ check(contentType, "text", "html", {"charset": "utf-8", "xxx": "YYY"});
String s = contentType.toString();
- bool expectedToString = (s == "text/html; charset=utf-8; xxx=yyy" ||
- s == "text/html; xxx=yyy; charset=utf-8");
+ bool expectedToString = (s == "text/html; charset=utf-8; xxx=YYY" ||
+ s == "text/html; xxx=YYY; charset=utf-8");
Expect.isTrue(expectedToString);
+ contentType = ContentType.parse("text/html; CHARSET=UTF-8; xxx=YYY");
+ check(contentType, "text", "html", {"charset": "utf-8", "xxx": "YYY"});
Expect.throws(() => contentType.parameters["xxx"] = "yyy",
(e) => e is UnsupportedError);
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698