| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "components/certificate_reporting/error_report.h" | 5 #include "components/certificate_reporting/error_report.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "components/certificate_reporting/cert_logger.pb.h" | 13 #include "components/certificate_reporting/cert_logger.pb.h" |
| 14 #include "net/base/test_data_directory.h" | |
| 15 #include "net/cert/cert_status_flags.h" | 14 #include "net/cert/cert_status_flags.h" |
| 16 #include "net/ssl/ssl_info.h" | 15 #include "net/ssl/ssl_info.h" |
| 17 #include "net/test/cert_test_util.h" | 16 #include "net/test/cert_test_util.h" |
| 17 #include "net/test/test_data_directory.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 using net::SSLInfo; | 21 using net::SSLInfo; |
| 22 using testing::UnorderedElementsAre; | 22 using testing::UnorderedElementsAre; |
| 23 | 23 |
| 24 namespace certificate_reporting { | 24 namespace certificate_reporting { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 ASSERT_TRUE(report.Serialize(&serialized_report)); | 154 ASSERT_TRUE(report.Serialize(&serialized_report)); |
| 155 | 155 |
| 156 ErrorReport parsed; | 156 ErrorReport parsed; |
| 157 ASSERT_TRUE(parsed.InitializeFromString(serialized_report)); | 157 ASSERT_TRUE(parsed.InitializeFromString(serialized_report)); |
| 158 EXPECT_EQ(report.hostname(), parsed.hostname()); | 158 EXPECT_EQ(report.hostname(), parsed.hostname()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace | 161 } // namespace |
| 162 | 162 |
| 163 } // namespace certificate_reporting | 163 } // namespace certificate_reporting |
| OLD | NEW |