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

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

Issue 12440002: Make instances of HeaderValue and ContentType immutable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from nweiz@ Created 7 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/string_transformer.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_advanced_test.dart
diff --git a/tests/standalone/io/http_advanced_test.dart b/tests/standalone/io/http_advanced_test.dart
index e19365f66a892fb3c4a7e1f6b2152da9357ad310..56b51e898c25d299b971aa5d5a69d2ef47340859 100644
--- a/tests/standalone/io/http_advanced_test.dart
+++ b/tests/standalone/io/http_advanced_test.dart
@@ -145,8 +145,7 @@ class TestServer {
Expect.equals("html", request.headers.contentType.subType);
Expect.equals("utf-8", request.headers.contentType.parameters["charset"]);
- ContentType contentType = new ContentType("text", "html");
- contentType.parameters["charset"] = "utf-8";
+ ContentType contentType = new ContentType("text", "html", charset: "utf-8");
response.headers.contentType = contentType;
response.close();
}
@@ -347,10 +346,8 @@ Future testContentType() {
httpClient.get("127.0.0.1", port, "/contenttype1")
.then((request) {
- ContentType contentType = new ContentType();
- contentType.value = "text/html";
- contentType.parameters["charset"] = "utf-8";
- request.headers.contentType = contentType;
+ request.headers.contentType =
+ new ContentType("text", "html", charset: "utf-8");
return request.close();
})
.then(processResponse);
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698