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

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

Issue 21351002: Make the parameters map of the HTTP HeaderValue unmodifiable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_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 845f6f6f186c39d606b921cd54bc9acda82916a3..4b9b7a74e30edc103892422cbffd12bf0b8e157f 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -251,6 +251,8 @@ void testContentType() {
Expect.equals("", contentType.primaryType);
Expect.equals("", contentType.subType);
Expect.equals("/", contentType.value);
+ Expect.throws(() => contentType.parameters["xxx"] = "yyy",
+ (e) => e is UnsupportedError);
contentType = ContentType.parse("text/html");
check(contentType, "text", "html");
@@ -258,6 +260,8 @@ void testContentType() {
contentType = new ContentType("text", "html", charset: "utf-8");
check(contentType, "text", "html", {"charset": "utf-8"});
Expect.equals("text/html; charset=utf-8", contentType.toString());
+ Expect.throws(() => contentType.parameters["xxx"] = "yyy",
+ (e) => e is UnsupportedError);
contentType = new ContentType("text",
"html",
@@ -267,6 +271,8 @@ void testContentType() {
bool expectedToString = (s == "text/html; charset=utf-8; xxx=yyy" ||
s == "text/html; xxx=yyy; charset=utf-8");
Expect.isTrue(expectedToString);
+ Expect.throws(() => contentType.parameters["xxx"] = "yyy",
+ (e) => e is UnsupportedError);
contentType = new ContentType("text",
"html",
« 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