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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "base/time.h" | 10 #include "base/time/time.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "net/http/http_response_headers.h" | 12 #include "net/http/http_response_headers.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 struct TestData { | 17 struct TestData { |
18 const char* raw_headers; | 18 const char* raw_headers; |
19 const char* expected_headers; | 19 const char* expected_headers; |
20 int expected_response_code; | 20 int expected_response_code; |
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 EXPECT_EQ(parsed->response_code(), recreated->response_code()); | 1870 EXPECT_EQ(parsed->response_code(), recreated->response_code()); |
1871 EXPECT_EQ(parsed->GetContentLength(), recreated->GetContentLength()); | 1871 EXPECT_EQ(parsed->GetContentLength(), recreated->GetContentLength()); |
1872 EXPECT_EQ(parsed->IsKeepAlive(), recreated->IsKeepAlive()); | 1872 EXPECT_EQ(parsed->IsKeepAlive(), recreated->IsKeepAlive()); |
1873 | 1873 |
1874 std::string normalized_parsed; | 1874 std::string normalized_parsed; |
1875 parsed->GetNormalizedHeaders(&normalized_parsed); | 1875 parsed->GetNormalizedHeaders(&normalized_parsed); |
1876 std::string normalized_recreated; | 1876 std::string normalized_recreated; |
1877 parsed->GetNormalizedHeaders(&normalized_recreated); | 1877 parsed->GetNormalizedHeaders(&normalized_recreated); |
1878 EXPECT_EQ(normalized_parsed, normalized_recreated); | 1878 EXPECT_EQ(normalized_parsed, normalized_recreated); |
1879 } | 1879 } |
OLD | NEW |