| Index: third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp b/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp
|
| index c4b37f672c695172756405d8957f929c233b2506..d923950bf1759f5cefe55a97af105f81551b8487 100644
|
| --- a/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp
|
| @@ -477,18 +477,6 @@ TEST(HTTPParsersTest, ParseMultipartHeadersContentCharset) {
|
| EXPECT_EQ("utf-8", response.TextEncodingName());
|
| }
|
|
|
| -TEST(HTTPParsersTest, CheckDoubleQuotedString) {
|
| - EXPECT_EQ(CheckDoubleQuotedString(""), "");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\""), "\"");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\"\""), "");
|
| - EXPECT_EQ(CheckDoubleQuotedString("foo"), "foo");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\"foo"), "\"foo");
|
| - EXPECT_EQ(CheckDoubleQuotedString("foo\""), "foo\"");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\"foo\""), "foo");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\"foo\"bar\""), "foo\"bar");
|
| - EXPECT_EQ(CheckDoubleQuotedString("\"foo\\bar\""), "foobar");
|
| -}
|
| -
|
| void testServerTimingHeader(const char* headerValue,
|
| Vector<Vector<String>> expectedResults) {
|
| std::unique_ptr<ServerTimingHeaderVector> results =
|
| @@ -974,6 +962,27 @@ TEST(HTTPParsersTest, ParseServerTimingHeader) {
|
| {{"metric1", "12.3", "description1"},
|
| {"metric2", "45.6", "description2"},
|
| {"metric3", "78.9", "description3"}});
|
| +
|
| + // quoted-string
|
| + testServerTimingHeader("metric;\"\"", {{"metric", "0", ""}});
|
| + testServerTimingHeader("metric;\"\"\"", {{"metric", "0", ""}});
|
| + testServerTimingHeader("metric;\"\\\"\"", {{"metric", "0", "\""}});
|
| + testServerTimingHeader("metric;\"\\\\\"\"", {{"metric", "0", "\\"}});
|
| + testServerTimingHeader("metric;\"\\\\\\\"\"", {{"metric", "0", "\\\""}});
|
| +
|
| + // optional whitespace (OWS)
|
| + testServerTimingHeader("metric1\t=\t1", {{"metric1", "1", ""}});
|
| + testServerTimingHeader("metric1\t;\tdescription",
|
| + {{"metric1", "0", "description"}});
|
| + testServerTimingHeader("metric1\t,\tmetric2",
|
| + {{"metric1", "0", ""}, {"metric2", "0", ""}});
|
| + testServerTimingHeader(
|
| + "metric1\t;\t\"description\"\t, metric2",
|
| + {{"metric1", "0", "description"}, {"metric2", "0", ""}});
|
| + testServerTimingHeader(
|
| + "\tmetric1\t=\t1\t;\tdescription1\t,\tmetric2\t"
|
| + "=\t2\t;\tdescription2\t",
|
| + {{"metric1", "1", "description1"}, {"metric2", "2", "description2"}});
|
| }
|
|
|
| } // namespace blink
|
|
|