OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h" | 5 #include "components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/big_endian.h" | 12 #include "base/big_endian.h" |
| 13 #include "base/macros.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
12 | 15 |
13 namespace { | 16 namespace { |
14 | 17 |
15 const uint8_t kFirstHashRaw[] = | 18 const uint8_t kFirstHashRaw[] = |
16 {0x00, 0x00, 0x03, 0xd7, 0xfc, 0x18, 0x02, 0xcb}; | 19 {0x00, 0x00, 0x03, 0xd7, 0xfc, 0x18, 0x02, 0xcb}; |
17 std::string GetFirstHash() { | 20 std::string GetFirstHash() { |
18 return std::string(reinterpret_cast<const char*>(kFirstHashRaw), 8); | 21 return std::string(reinterpret_cast<const char*>(kFirstHashRaw), 8); |
19 } | 22 } |
20 | 23 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 148 } |
146 | 149 |
147 TEST(PackedEVCertsWhitelistTest, CorrectlyIdentifiesWhitelistIsValid) { | 150 TEST(PackedEVCertsWhitelistTest, CorrectlyIdentifiesWhitelistIsValid) { |
148 scoped_refptr<PackedEVCertsWhitelist> whitelist( | 151 scoped_refptr<PackedEVCertsWhitelist> whitelist( |
149 new PackedEVCertsWhitelist(GetAllWhitelistData(), base::Version())); | 152 new PackedEVCertsWhitelist(GetAllWhitelistData(), base::Version())); |
150 | 153 |
151 EXPECT_TRUE(whitelist->IsValid()); | 154 EXPECT_TRUE(whitelist->IsValid()); |
152 } | 155 } |
153 | 156 |
154 } // namespace packed_ct_ev_whitelist | 157 } // namespace packed_ct_ev_whitelist |
OLD | NEW |