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 "net/cert/nss_profile_filter_chromeos.h" | 5 #include "net/cert/nss_profile_filter_chromeos.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
9 #include <secmod.h> | 9 #include <secmod.h> |
10 | 10 |
11 #include "crypto/nss_util.h" | |
12 #include "crypto/nss_util_internal.h" | 11 #include "crypto/nss_util_internal.h" |
13 #include "crypto/scoped_nss_types.h" | 12 #include "crypto/scoped_nss_types.h" |
| 13 #include "crypto/scoped_test_nss_chromeos_user.h" |
14 #include "net/base/test_data_directory.h" | 14 #include "net/base/test_data_directory.h" |
15 #include "net/test/cert_test_util.h" | 15 #include "net/test/cert_test_util.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 crypto::ScopedPK11Slot GetRootCertsSlot() { | 22 crypto::ScopedPK11Slot GetRootCertsSlot() { |
23 crypto::AutoSECMODListReadLock auto_lock; | 23 crypto::AutoSECMODListReadLock auto_lock; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 EXPECT_TRUE(profile_filter_1_.IsCertAllowed(cert_1->os_cert_handle())); | 183 EXPECT_TRUE(profile_filter_1_.IsCertAllowed(cert_1->os_cert_handle())); |
184 EXPECT_TRUE(profile_filter_1_copy_.IsCertAllowed(cert_1->os_cert_handle())); | 184 EXPECT_TRUE(profile_filter_1_copy_.IsCertAllowed(cert_1->os_cert_handle())); |
185 EXPECT_FALSE(profile_filter_1_.IsCertAllowed(cert_2->os_cert_handle())); | 185 EXPECT_FALSE(profile_filter_1_.IsCertAllowed(cert_2->os_cert_handle())); |
186 EXPECT_FALSE(profile_filter_1_copy_.IsCertAllowed(cert_2->os_cert_handle())); | 186 EXPECT_FALSE(profile_filter_1_copy_.IsCertAllowed(cert_2->os_cert_handle())); |
187 | 187 |
188 EXPECT_FALSE(profile_filter_2_.IsCertAllowed(cert_1->os_cert_handle())); | 188 EXPECT_FALSE(profile_filter_2_.IsCertAllowed(cert_1->os_cert_handle())); |
189 EXPECT_TRUE(profile_filter_2_.IsCertAllowed(cert_2->os_cert_handle())); | 189 EXPECT_TRUE(profile_filter_2_.IsCertAllowed(cert_2->os_cert_handle())); |
190 } | 190 } |
191 | 191 |
192 } // namespace net | 192 } // namespace net |
OLD | NEW |