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

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

Issue 14914002: Change fromString constructor to parse static method (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed additional tests 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 | « tests/standalone/io/http_body_test.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 111379ca06b91c5ba953acc942118df89c2081da..88faa65980c7d74d54011551161213d2daf31132 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -203,14 +203,14 @@ void testHeaderValue() {
}
HeaderValue headerValue;
- headerValue = new HeaderValue.fromString(
+ headerValue = HeaderValue.parse(
"xxx; aaa=bbb; ccc=\"\\\";\\a\"; ddd=\" \"");
check(headerValue, "xxx", {"aaa": "bbb", "ccc": '\";a', "ddd": " "});
headerValue = new HeaderValue("xxx",
{"aaa": "bbb", "ccc": '\";a', "ddd": " "});
check(headerValue, "xxx", {"aaa": "bbb", "ccc": '\";a', "ddd": " "});
- headerValue = new HeaderValue.fromString(
+ headerValue = HeaderValue.parse(
"attachment; filename=genome.jpeg;"
"modification-date=\"Wed, 12 February 1997 16:29:51 -0500\"");
var parameters = {
@@ -220,7 +220,7 @@ void testHeaderValue() {
check(headerValue, "attachment", parameters);
headerValue = new HeaderValue("attachment", parameters);
check(headerValue, "attachment", parameters);
- headerValue = new HeaderValue.fromString(
+ headerValue = HeaderValue.parse(
" attachment ;filename=genome.jpeg ;"
"modification-date = \"Wed, 12 February 1997 16:29:51 -0500\"" );
check(headerValue, "attachment", parameters);
@@ -250,7 +250,7 @@ void testContentType() {
Expect.equals("", contentType.subType);
Expect.equals("/", contentType.value);
- contentType = new ContentType.fromString("text/html");
+ contentType = ContentType.parse("text/html");
check(contentType, "text", "html");
Expect.equals("text/html", contentType.toString());
contentType = new ContentType("text", "html", charset: "utf-8");
@@ -276,25 +276,25 @@ void testContentType() {
s == "text/html; xxx=yyy; charset=iso-8859-1");
Expect.isTrue(expectedToString);
- contentType = new ContentType.fromString("text/html");
+ contentType = ContentType.parse("text/html");
check(contentType, "text", "html");
- contentType = new ContentType.fromString(" text/html ");
+ contentType = ContentType.parse(" text/html ");
check(contentType, "text", "html");
- contentType = new ContentType.fromString("text/html; charset=utf-8");
+ contentType = ContentType.parse("text/html; charset=utf-8");
check(contentType, "text", "html", {"charset": "utf-8"});
- contentType = new ContentType.fromString(
+ contentType = ContentType.parse(
" text/html ; charset = utf-8 ");
check(contentType, "text", "html", {"charset": "utf-8"});
- contentType = new ContentType.fromString(
+ contentType = ContentType.parse(
"text/html; charset=utf-8; xxx=yyy");
check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
- contentType = new ContentType.fromString(
+ contentType = ContentType.parse(
" text/html ; charset = utf-8 ; xxx=yyy ");
check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
- contentType = new ContentType.fromString(
+ contentType = ContentType.parse(
'text/html; charset=utf-8; xxx="yyy"');
check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
- contentType = new ContentType.fromString(
+ contentType = ContentType.parse(
" text/html ; charset = utf-8 ; xxx=yyy ");
check(contentType, "text", "html", {"charset": "utf-8", "xxx": "yyy"});
}
« no previous file with comments | « tests/standalone/io/http_body_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698