Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: net/cert/ct_serialization_unittest.cc

Issue 1953773002: Forward declare CT structs in ct_serialization.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/ct_serialization.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/base/test_data_directory.h" 12 #include "net/base/test_data_directory.h"
13 #include "net/cert/signed_certificate_timestamp.h"
14 #include "net/cert/signed_tree_head.h"
13 #include "net/cert/x509_certificate.h" 15 #include "net/cert/x509_certificate.h"
14 #include "net/log/net_log.h" 16 #include "net/log/net_log.h"
15 #include "net/test/cert_test_util.h" 17 #include "net/test/cert_test_util.h"
16 #include "net/test/ct_test_util.h" 18 #include "net/test/ct_test_util.h"
17 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
18 20
19 namespace net { 21 namespace net {
20 22
21 class CtSerializationTest : public ::testing::Test { 23 class CtSerializationTest : public ::testing::Test {
22 public: 24 public:
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Bytes 18-49 are sha256 root hash 177 // Bytes 18-49 are sha256 root hash
176 ASSERT_EQ(50u, encoded.length()); 178 ASSERT_EQ(50u, encoded.length());
177 std::string expected_buffer( 179 std::string expected_buffer(
178 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18); 180 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18);
179 expected_buffer.append(ct::GetSampleSTHSHA256RootHash()); 181 expected_buffer.append(ct::GetSampleSTHSHA256RootHash());
180 ASSERT_EQ(expected_buffer, encoded); 182 ASSERT_EQ(expected_buffer, encoded);
181 } 183 }
182 184
183 } // namespace net 185 } // namespace net
184 186
OLDNEW
« no previous file with comments | « net/cert/ct_serialization.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698