| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_request_headers.h" | 5 #include "net/http/http_request_headers.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/values.h" | 8 #include "base/values.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 TEST(HttpRequestHeaders, HasHeader) { | 15 TEST(HttpRequestHeaders, HasHeader) { |
| 15 HttpRequestHeaders headers; | 16 HttpRequestHeaders headers; |
| 16 headers.SetHeader("Foo", "bar"); | 17 headers.SetHeader("Foo", "bar"); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 ASSERT_TRUE(HttpRequestHeaders::FromNetLogParam(event_param.get(), | 179 ASSERT_TRUE(HttpRequestHeaders::FromNetLogParam(event_param.get(), |
| 179 &headers2, | 180 &headers2, |
| 180 &request_line2)); | 181 &request_line2)); |
| 181 EXPECT_EQ(request_line, request_line2); | 182 EXPECT_EQ(request_line, request_line2); |
| 182 EXPECT_EQ("B: b\r\nA: a\r\n\r\n", headers2.ToString()); | 183 EXPECT_EQ("B: b\r\nA: a\r\n\r\n", headers2.ToString()); |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace | 186 } // namespace |
| 186 | 187 |
| 187 } // namespace net | 188 } // namespace net |
| OLD | NEW |