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

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

Issue 401623006: Extract ScopedTestNSSDB from nss_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« crypto/nss_util.cc ('K') | « net/cert/nss_cert_database_unittest.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698