OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/cert/ct_serialization.h" | 5 #include "net/cert/ct_serialization.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "net/base/test_completion_callback.h" | 11 #include "net/base/test_completion_callback.h" |
12 #include "net/cert/merkle_tree_leaf.h" | 12 #include "net/cert/merkle_tree_leaf.h" |
13 #include "net/cert/signed_certificate_timestamp.h" | 13 #include "net/cert/signed_certificate_timestamp.h" |
14 #include "net/cert/signed_tree_head.h" | 14 #include "net/cert/signed_tree_head.h" |
15 #include "net/cert/x509_certificate.h" | 15 #include "net/cert/x509_certificate.h" |
16 #include "net/log/net_log.h" | |
17 #include "net/test/cert_test_util.h" | 16 #include "net/test/cert_test_util.h" |
18 #include "net/test/ct_test_util.h" | 17 #include "net/test/ct_test_util.h" |
19 #include "net/test/test_data_directory.h" | 18 #include "net/test/test_data_directory.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
22 | 21 |
23 using ::testing::ElementsAreArray; | 22 using ::testing::ElementsAreArray; |
24 | 23 |
25 namespace net { | 24 namespace net { |
26 | 25 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Bytes 18-49 are sha256 root hash | 253 // Bytes 18-49 are sha256 root hash |
255 ASSERT_EQ(50u, encoded.length()); | 254 ASSERT_EQ(50u, encoded.length()); |
256 std::string expected_buffer( | 255 std::string expected_buffer( |
257 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18); | 256 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18); |
258 expected_buffer.append(ct::GetSampleSTHSHA256RootHash()); | 257 expected_buffer.append(ct::GetSampleSTHSHA256RootHash()); |
259 ASSERT_EQ(expected_buffer, encoded); | 258 ASSERT_EQ(expected_buffer, encoded); |
260 } | 259 } |
261 | 260 |
262 } // namespace net | 261 } // namespace net |
263 | 262 |
OLD | NEW |