Lines Matching refs:headers
14 HttpRequestHeaders headers;
15 headers.SetHeader("Foo", "bar");
16 EXPECT_TRUE(headers.HasHeader("foo"));
17 EXPECT_TRUE(headers.HasHeader("Foo"));
18 EXPECT_FALSE(headers.HasHeader("Fo"));
20 const HttpRequestHeaders& headers_ref = headers;
27 HttpRequestHeaders headers;
28 headers.SetHeader("Foo", "bar");
29 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
33 HttpRequestHeaders headers;
34 headers.SetHeader("Cookie-Monster", "Nom nom nom");
35 headers.SetHeader("Domo-Kun", "Loves Chrome");
37 headers.ToString());
41 HttpRequestHeaders headers;
42 headers.SetHeader("Foo", "bar");
43 headers.SetHeader("Foo", "bar");
44 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
48 HttpRequestHeaders headers;
49 headers.SetHeader("Foo", "bar");
50 headers.SetHeader("FoO", "Bar");
51 EXPECT_EQ("Foo: Bar\r\n\r\n", headers.ToString());
55 HttpRequestHeaders headers;
56 headers.SetHeader("FooBar", "smokes");
57 headers.SetHeader("Foo", "crack");
58 EXPECT_EQ("FooBar: smokes\r\nFoo: crack\r\n\r\n", headers.ToString());
59 const HttpRequestHeaders& headers_ref = headers;
64 HttpRequestHeaders headers;
65 headers.SetHeader("Foo", "Bar");
66 headers.SetHeader("Bar", "");
67 EXPECT_EQ("Foo: Bar\r\nBar:\r\n\r\n", headers.ToString());
71 HttpRequestHeaders headers;
72 headers.SetHeaderIfMissing("Foo", "Bar");
73 EXPECT_EQ("Foo: Bar\r\n\r\n", headers.ToString());
74 headers.SetHeaderIfMissing("Foo", "Baz");
75 EXPECT_EQ("Foo: Bar\r\n\r\n", headers.ToString());
79 HttpRequestHeaders headers;
80 headers.SetHeader("Foo", "bar");
81 headers.RemoveHeader("Foo");
82 EXPECT_EQ("\r\n", headers.ToString());
86 HttpRequestHeaders headers;
87 headers.SetHeader("Foo", "bar");
88 headers.RemoveHeader("Bar");
89 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
93 HttpRequestHeaders headers;
94 headers.SetHeader("Foo", "bar");
95 headers.SetHeader("All-Your-Base", "Belongs To Chrome");
96 headers.RemoveHeader("foo");
97 EXPECT_EQ("All-Your-Base: Belongs To Chrome\r\n\r\n", headers.ToString());
101 HttpRequestHeaders headers;
102 headers.AddHeaderFromString("Foo: bar");
103 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
107 HttpRequestHeaders headers;
108 headers.AddHeaderFromString("Foo:bar");
109 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
113 HttpRequestHeaders headers;
114 headers.AddHeaderFromString("Foo: \t \t bar");
115 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
119 HttpRequestHeaders headers;
120 headers.AddHeaderFromString("Foo: bar \t \t ");
121 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
125 HttpRequestHeaders headers;
126 headers.AddHeaderFromString("Foo: \t bar\t ");
127 EXPECT_EQ("Foo: bar\r\n\r\n", headers.ToString());
131 HttpRequestHeaders headers;
132 headers.AddHeaderFromString("Foo:");
133 EXPECT_EQ("Foo:\r\n\r\n", headers.ToString());
137 HttpRequestHeaders headers;
138 headers.AddHeaderFromString("Foo: ");
139 EXPECT_EQ("Foo:\r\n\r\n", headers.ToString());
143 HttpRequestHeaders headers;
144 headers.SetHeader("A", "A");
145 headers.SetHeader("B", "B");
150 headers.MergeFrom(headers2);
151 EXPECT_EQ("A: A\r\nB: b\r\nC: c\r\n\r\n", headers.ToString());
155 HttpRequestHeaders headers;
156 headers.SetHeader("A", "A");
157 headers.SetHeader("B", "B");
162 headers.CopyFrom(headers2);
163 EXPECT_EQ("B: b\r\nC: c\r\n\r\n", headers.ToString());