Index: Source/core/fetch/FetchUtilsTest.cpp |
diff --git a/Source/core/fetch/FetchUtilsTest.cpp b/Source/core/fetch/FetchUtilsTest.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ce0a7a38b2a690a86abb509177112ffa3e500c65 |
--- /dev/null |
+++ b/Source/core/fetch/FetchUtilsTest.cpp |
@@ -0,0 +1,35 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef FetchUtilsTest_h |
+#define FetchUtilsTest_h |
+ |
+#include "config.h" |
+#include "core/fetch/FetchUtils.h" |
+ |
+#include "wtf/text/AtomicString.h" |
+ |
+#include <gtest/gtest.h> |
+ |
+namespace blink { |
+ |
+namespace { |
+ |
+TEST(FetchUtilsTest, NormalizeHeaderValue) |
+{ |
+ EXPECT_EQ("t", FetchUtils::normalizeHeaderValue(" t")); |
+ EXPECT_EQ("t", FetchUtils::normalizeHeaderValue("t ")); |
+ EXPECT_EQ("t", FetchUtils::normalizeHeaderValue(" t ")); |
+ EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\r")); |
+ EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\n")); |
+ EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\r\n")); |
+ EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\t")); |
+ EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test")); |
Mike West
2015/09/21 11:31:27
Nit: Can you add leading examples of these values
Mike West
2015/09/21 11:31:27
Nit: Can you add leading examples of these values
shiva.jm
2015/09/22 06:01:09
Done.
shiva.jm
2015/09/22 06:01:09
Done.
|
+} |
+ |
+} // namespace |
+ |
+} // namespace blink |
+ |
+#endif // FetchUtilsTest_h |