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 "net/cert/ev_root_ca_metadata.h" | 5 #include "net/cert/ev_root_ca_metadata.h" |
6 | 6 |
7 #include "net/cert/x509_cert_types.h" | 7 #include "net/cert/x509_cert_types.h" |
8 #include "net/test/cert_test_util.h" | 8 #include "net/test/cert_test_util.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 bool EVOidData::Init() { | 87 bool EVOidData::Init() { |
88 return true; | 88 return true; |
89 } | 89 } |
90 | 90 |
91 #endif | 91 #endif |
92 | 92 |
93 #if defined(USE_NSS) || defined(OS_WIN) | 93 #if defined(USE_NSS) || defined(OS_WIN) |
94 | 94 |
95 class EVRootCAMetadataTest : public testing::Test { | 95 class EVRootCAMetadataTest : public testing::Test { |
96 protected: | 96 protected: |
97 virtual void SetUp() OVERRIDE { | 97 virtual void SetUp() override { |
98 ASSERT_TRUE(ev_oid_data.Init()); | 98 ASSERT_TRUE(ev_oid_data.Init()); |
99 } | 99 } |
100 | 100 |
101 EVOidData ev_oid_data; | 101 EVOidData ev_oid_data; |
102 }; | 102 }; |
103 | 103 |
104 TEST_F(EVRootCAMetadataTest, Basic) { | 104 TEST_F(EVRootCAMetadataTest, Basic) { |
105 EVRootCAMetadata* ev_metadata(EVRootCAMetadata::GetInstance()); | 105 EVRootCAMetadata* ev_metadata(EVRootCAMetadata::GetInstance()); |
106 | 106 |
107 EXPECT_TRUE(ev_metadata->IsEVPolicyOID(ev_oid_data.verisign_policy)); | 107 EXPECT_TRUE(ev_metadata->IsEVPolicyOID(ev_oid_data.verisign_policy)); |
(...skipping 27 matching lines...) Expand all Loading... |
135 EXPECT_FALSE(ev_metadata->IsEVPolicyOID(ev_oid_data.fake_policy)); | 135 EXPECT_FALSE(ev_metadata->IsEVPolicyOID(ev_oid_data.fake_policy)); |
136 EXPECT_FALSE(ev_metadata->HasEVPolicyOID(kFakeFingerprint, | 136 EXPECT_FALSE(ev_metadata->HasEVPolicyOID(kFakeFingerprint, |
137 ev_oid_data.fake_policy)); | 137 ev_oid_data.fake_policy)); |
138 } | 138 } |
139 | 139 |
140 #endif // defined(USE_NSS) || defined(OS_WIN) | 140 #endif // defined(USE_NSS) || defined(OS_WIN) |
141 | 141 |
142 } // namespace | 142 } // namespace |
143 | 143 |
144 } // namespace net | 144 } // namespace net |
OLD | NEW |