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

Side by Side Diff: net/ssl/client_cert_store_chromeos_unittest.cc

Issue 137553004: NSS Cros multiprofile: trust roots added by a profile shouldn't apply to other profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios TestRootCerts fix Created 6 years, 10 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 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/ssl/client_cert_store_chromeos.h" 5 #include "net/ssl/client_cert_store_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 19 matching lines...) Expand all
30 const SSLCertRequestInfo& cert_request_info, 30 const SSLCertRequestInfo& cert_request_info,
31 CertificateList* selected_certs) { 31 CertificateList* selected_certs) {
32 return store_.SelectClientCertsForTesting( 32 return store_.SelectClientCertsForTesting(
33 input_certs, cert_request_info, selected_certs); 33 input_certs, cert_request_info, selected_certs);
34 } 34 }
35 35
36 private: 36 private:
37 ClientCertStoreChromeOS store_; 37 ClientCertStoreChromeOS store_;
38 }; 38 };
39 39
40 INSTANTIATE_TYPED_TEST_CASE_P(ChromeOS,
41 ClientCertStoreTest,
42 ClientCertStoreChromeOSTestDelegate);
43
44 class ClientCertStoreChromeOSTest : public ::testing::Test { 40 class ClientCertStoreChromeOSTest : public ::testing::Test {
45 public: 41 public:
46 scoped_refptr<X509Certificate> ImportCertForUser( 42 scoped_refptr<X509Certificate> ImportCertForUser(
47 const std::string& username_hash, 43 const std::string& username_hash,
48 const std::string& filename, 44 const std::string& filename,
49 const std::string& password) { 45 const std::string& password) {
50 crypto::ScopedPK11Slot slot( 46 crypto::ScopedPK11Slot slot(
51 crypto::GetPublicSlotForChromeOSUser(username_hash)); 47 crypto::GetPublicSlotForChromeOSUser(username_hash));
52 EXPECT_TRUE(slot.get()); 48 EXPECT_TRUE(slot.get());
53 if (!slot.get()) 49 if (!slot.get())
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 run_loop_1.Run(); 180 run_loop_1.Run();
185 run_loop_2.Run(); 181 run_loop_2.Run();
186 182
187 ASSERT_EQ(1u, request_1->client_certs.size()); 183 ASSERT_EQ(1u, request_1->client_certs.size());
188 EXPECT_TRUE(cert_1->Equals(request_1->client_certs[0])); 184 EXPECT_TRUE(cert_1->Equals(request_1->client_certs[0]));
189 // TODO(mattm): Request for second user will have zero results due to 185 // TODO(mattm): Request for second user will have zero results due to
190 // crbug.com/315285. Update the test once that is fixed. 186 // crbug.com/315285. Update the test once that is fixed.
191 } 187 }
192 188
193 } // namespace net 189 } // namespace net
OLDNEW
« net/cert/test_root_certs.h ('K') | « net/data/ssl/scripts/generate-multi-root-test-chains.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698