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

Unified Diff: third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp

Issue 2736283002: Allow ParsedContentType to reject multiple definitions of the same parameter (Closed)
Patch Set: check first Created 3 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 | « third_party/WebKit/Source/platform/network/ParsedContentType.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp
diff --git a/third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp b/third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp
index 7a40f21fec02b2ec4ed2a2eb4dae12ac30fa4d5e..8729bbe85e287095b141b1461d3de6df5f1ef71c 100644
--- a/third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp
+++ b/third_party/WebKit/Source/platform/network/ParsedContentTypeTest.cpp
@@ -133,6 +133,13 @@ TEST(ParsedContentTypeTest, RelaxedParameterName) {
EXPECT_EQ("u", t.parameterValueForName("y"));
}
+TEST(ParsedContentTypeTest, StrictParameterName) {
+ EXPECT_TRUE(isValid("text/plain", Mode::Strict));
+ EXPECT_TRUE(isValid("text/plain; p1=a", Mode::Strict));
+ EXPECT_FALSE(isValid("text/plain; p1=a; p1=b", Mode::Strict));
+ EXPECT_TRUE(isValid("text/plain; p1=a; p2=b", Mode::Strict));
+}
+
} // namespace
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/network/ParsedContentType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698