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

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

Issue 195893019: Add fixed content type values for commonly used content types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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.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 7417d56382cda6c26a818271f2718d82fa4a391b..a4ea1a3e380832b38371b3a7e1ef4da790cb74b0 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -325,6 +325,12 @@ void testContentType() {
contentType = ContentType.parse(
" text/html ; charset = utf-8 ; xxx=yyy ");
check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
+
+ // Test builtin content types.
+ check(ContentType.TEXT, "text", "plain", {"charset": "utf-8"});
+ check(ContentType.HTML, "text", "html", {"charset": "utf-8"});
+ check(ContentType.JSON, "application", "json", {"charset": "utf-8"});
+ check(ContentType.BINARY, "application", "octet-stream");
}
void testContentTypeCache() {
« no previous file with comments | « sdk/lib/io/http.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698