OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef FetchUtilsTest_h | |
6 #define FetchUtilsTest_h | |
tyoshino (SeeGerritForStatus)
2015/09/24 09:24:02
oh, I didn't catch this. remove the include guard
shiva.jm
2015/09/24 09:41:38
actually, its added in few test files, majority te
tyoshino (SeeGerritForStatus)
2015/09/28 06:03:37
I've cleaned up the test files. Thank for the info
| |
7 | |
8 #include "config.h" | |
9 #include "core/fetch/FetchUtils.h" | |
10 | |
11 #include "wtf/text/AtomicString.h" | |
tyoshino (SeeGerritForStatus)
2015/09/24 09:26:57
is this necessary?
shiva.jm
2015/09/24 09:41:38
yes, its needed, otherwise will get compile error.
tyoshino (SeeGerritForStatus)
2015/09/28 06:02:09
How about wtf/text/WTFString.h? It's indirectly in
| |
12 | |
13 #include <gtest/gtest.h> | |
14 | |
15 namespace blink { | |
16 | |
17 namespace { | |
18 | |
19 TEST(FetchUtilsTest, NormalizeHeaderValue) | |
20 { | |
21 EXPECT_EQ("t", FetchUtils::normalizeHeaderValue(" t")); | |
22 EXPECT_EQ("t", FetchUtils::normalizeHeaderValue("t ")); | |
23 EXPECT_EQ("t", FetchUtils::normalizeHeaderValue(" t ")); | |
24 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\r")); | |
25 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\n")); | |
26 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\r\n")); | |
27 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test\t")); | |
28 EXPECT_EQ("t t", FetchUtils::normalizeHeaderValue("t t")); | |
29 EXPECT_EQ("t\tt", FetchUtils::normalizeHeaderValue("t\tt")); | |
30 EXPECT_EQ("t\rt", FetchUtils::normalizeHeaderValue("t\rt")); | |
31 EXPECT_EQ("t\nt", FetchUtils::normalizeHeaderValue("t\nt")); | |
32 EXPECT_EQ("t\r\nt", FetchUtils::normalizeHeaderValue("t\r\nt")); | |
33 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("\rtest")); | |
34 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("\ntest")); | |
35 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("\r\ntest")); | |
36 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("\ttest")); | |
37 EXPECT_EQ("", FetchUtils::normalizeHeaderValue("")); | |
38 EXPECT_EQ("", FetchUtils::normalizeHeaderValue(" ")); | |
39 EXPECT_EQ("", FetchUtils::normalizeHeaderValue("\r\n\r\n\r\n")); | |
40 EXPECT_EQ("\xd0\xa1", FetchUtils::normalizeHeaderValue("\xd0\xa1")); | |
41 EXPECT_EQ("test", FetchUtils::normalizeHeaderValue("test")); | |
42 } | |
43 | |
44 } // namespace | |
45 | |
46 } // namespace blink | |
47 | |
48 #endif // FetchUtilsTest_h | |
tyoshino (SeeGerritForStatus)
2015/09/24 09:24:02
here too
shiva.jm
2015/09/24 09:41:38
Done.
| |
OLD | NEW |